You want the last part of products/lastpart/ for a specific page.
e.g. {{dc:url:segment index="-1"}}
will grab the last part of the url. maybe -2, -3 could work also to go further back.
if not maybe we could have ability to find total segments and use in the index attribute with another dynamic value to deduct e.g. {{dc:url:segment index="{{dc:url:segment_total subtract=“1”}}"}}
Thanks