Skip to main content
Level 2
July 28, 2017
Question

Velocity Scripting: Asset information

  • July 28, 2017
  • 1 reply
  • 4142 views

Hi there,

I'm trying to implement a velocity script (vs) that runs for multiple cases and allows me to use the name of the asset as a utm_id for my Google Analytics (GA) tags. So, that way, my script can be on the campaign folder level, or the workspace level if possible, to compose the redirect for GA, removing that customization aspect from the links.

In my vision, all I need to ask the agency is Please make sure that all your links are finished with ?{{my.redirect}} where redirect is my vs which will take care of the creation of the redirect depending on the name of the email that is being deployed from.

The bottom line questions is, can I access the asset name that is running the velocity script? so I can create a redirect with ?utm_id=My_cool_email because the name from which is running is named my_cool_email?

Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
July 28, 2017

I'm a great champion of Velocity, but I think you're barking up the wrong tree here.  VTL doesn't have any better access to the name of the asset than a standard token -- why not use {{Program.Id}} or {{Program.Name}}?

Level 2
August 14, 2017

Hey Sanford,

Thanks for the answer, The reason is because I'd have two emails in the same program and I cannot separate them, for AB Testing for example.

My solution will probably go down to using asset variables and controlling the redirects in there (at least for AB Tests), I was kinda hoping to have VS make that decision for me. Thanks!

SanfordWhiteman
Level 10
August 14, 2017

Velocity does have access to the unique Email ID, though not, IIRC, the Email Name (which after all isn't unique).