Expand my Community achievements bar.

SOLVED

s.Util.getQueryParam

Avatar

Level 1

Trying to implement the new appmeasurement and having some issues with parsing multiple parameters in on string

Use to be

    if (!s.campaign)

        s.campaign = s.getQueryParam('PartnerId,utm_source,utm_medium,utm_term,utm_content', '|');

 

Update:

   if (!s.campaign){

        s.campaign = s.Util.getQueryParam('PartnerId');

        s.campaign = s.Util.getQueryParam('utm_source');

        s.campaign = s.Util.getQueryParam('utm_medium');

        s.campaign = s.Util.getQueryParam('utm_content');

}

This is not working for me, any ideas?

1 Accepted Solution

Avatar

Correct answer by
Employee

There's an update to the getQueryParam plugin that solves your issues (plus is amazing in additional ways)!

You do need to reach out to your consultant to get the code, though. Do you have a contact who can provide the updated plugin to you?

View solution in original post

5 Replies

Avatar

Level 7

This is probably far from perfect but it does the job for us:

 

cID =    _satellite.getVar('cid'); medID = _satellite.getVar('utm_medium'); campID = _satellite.getVar('utm_campaign'); srcID = _satellite.getVar('utm_source'); s.campaign= cID; if (!s.campaign) { s.campaign = $.grep([campID, medID, srcID], Boolean).join(":"); }

Avatar

Level 1

Thanks for the reply, I was looking for a standard adobe solution, I can implement other function in jquery to pull all that in one line, but its still not adobe recommended

Avatar

Correct answer by
Employee

There's an update to the getQueryParam plugin that solves your issues (plus is amazing in additional ways)!

You do need to reach out to your consultant to get the code, though. Do you have a contact who can provide the updated plugin to you?

Avatar

Level 1

Yup, I got the new plugin!

 

Thanks

Avatar

Level 3

Would you please kindly share this new version of the plugin?