Capture last section of download link url
hi
i would like to capture the last part of our long file download urls because it is much easier to report when they are friendly urls. i know that i can use the following in a console to tell me the value of the page link.
location.href.split('/').pop();
But i need this for the file download url which just happens to open in a new window, as expected behaviour for our website.
i feel like i'm close, i've tried to capture the value in an eVar; i've tried to use the value above in a data element but i'm not getting any joy. Not sure where i'm going wrong. Can someone put me out of my misery.