Last active
April 9, 2018 13:22
-
-
Save jsn789/1a3e4055640ddf68a9871ef5c86913e7 to your computer and use it in GitHub Desktop.
GTM Custom JavaScript - Cleans up downloaded PDF file name. Used for GA Events Label
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function() { | |
// Example url: https://website.com/2015/10/File-Name.pdf | |
return {{Clicks - URL Path}}.split("/").slice(-1).join().split(".").shift(); | |
// Returns: File-Name | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment