s.Util.getQueryParam

zeyada61128569

10-05-2016

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?

Accepted Solutions (1)

Accepted Solutions (1)

michellel180245

Employee

12-05-2016

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?

Answers (4)

Answers (4)

zeyada61128569

11-05-2016

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

andrew_r-GrfLbX

11-05-2016

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(":"); }