Google Analytics tracking not working in Marketing emails



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=<%= %>

<% } %>

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


Accepted Solutions (0)

Answers (0)