Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!

Google Analytics tracking not working in Marketing emails

Avatar

Level 3

We're applying Google Analytics tracking to our emails using the External Accounts, Web Analytics tool in Campaign.  The code we're using is as follows:

<%@ include option='NmsTracking_ClickFormula' %>

<%  // Parameters expected by the Web Analytics partner

var pattern = new RegExp("(https://)", 'i');

if( $(urlstring).match(pattern) && delivery.FCP == false ){%>

  &utm_source=auto&utm_medium=Email&utm_campaign=<%= message.delivery.internalName %>

<% } %>

This works for our Message Center emails.  In so far as the specified UTM parameters are being appended to our URLs.  However, this isn't working on our other, non real time emails.

Can anyone see anything obvious in the syntax above that could be causing this?

Many thanks

Tom

0 Replies