1

I'm working on creating an email that will be sent to a Data Extension in Salesforce marketing cloud. There are however 4 other data extensions that each contain specific subscribers. In the email, there is a banner that will be different depending on whether or not the subscriber is in one or the other data extensions. This part is working perfectly.

The next part, though, is that I'd like to be able to track in Google Analytics based on which version of the banner someone sees - or in other words in this case which DE they are in. However, all of my coworkers say that this is impossible and I'm not really sure where to begin looking. It seems, though, that this would be a simple matter of using a custom attribute? But perhaps I'm under-thinking how the UTM source etc. are being passed to GA.

1 Answer 1

1

You can include AMPScript variables in the Web-Analytics Connector.

UPDATE

Or you can use AMPScript variables and manually append them to each of your URLs.

This method is a real pain.

Something like this:

%%[

var @utm_campaign, @utm_medium, @baseURLParams
set @utm_campaign = urlEncode(concat("CampaignA_",subscriberid))
set @utm_medium = "email"
set @baseURLParams = concat("utm_campaign=",@utm_campaign,"&utm_medium=",@utm_medium)

]%%


<a href="%%=redirectto(concat("http://degdigital.com?",@baseURLParams,"&utm_source=",urlencode(linkname)))=%%" alias="test link">test link<a>

Reference

3
  • Thanks Adam. Unfortunately Web-Analytics connector isn't in our budget for now :-\. Do you think a method may be employed where AmpScript is used to alter the campaign name in the UTM? Something like if SubscriberID is in DE1 then set @utmCampaign = "CampaignA_" and then in the email have something like google.com?utm_source=LinkAliasName&utm_medium=email&ut… Commented Jul 22, 2016 at 10:38
  • 1
    I've updated my answer above to show an AMPScript example. Commented Jul 22, 2016 at 13:29
  • 1
    Just checked with one of my co-workers, and I don't think the Web-Analytics Connector is a paid feature, unless you have a really old account. All you'd have to do is have SFMC Support enable it. Commented Jul 22, 2016 at 13:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .