Highlighted

Opinion Lab Tag - Referrer Rewrite?

Tealium Employee
Opinion Lab doesn't seem to be collecting the URL from the utag object and we need to re-write the referrer for our Opinion Lab Tag so that query parameters are not sent. Do we need to make this change to the tag template or through an extension? If it were an extension I was thinking something like setting b.referrerRewrite = b['dom.referrer'].split("?")[0]; - But I don't think this is going to work. Any thoughts?
6 REPLIES 6
Highlighted

Opinion Lab Tag - Referrer Rewrite?

Tealium Employee
If we were to edit the template I am assuming it would be within one of these pieces of code if (b.referrerRewrite) { j.referer = d.referrerRewrite(b.referrerRewrite) } OR function n(a, b) { var c = document, e = c.createElement('form'), f = c.createElement('input'), g = a.referrerRewrite; a.metrics.referer = location.href; if (g) { a.metrics.referer = d.referrerRewrite(g) }
Highlighted

Opinion Lab Tag - Referrer Rewrite?

Employee Emeritus
Jim, Those lines you are referring to are part of the OpinionLab JS Code. This isn't Tealium code. Vendors get a little touchy about making changes to their libraries. I would check with OL before updating that. Most of the common variables like referrer or URL are captured in the vendor's library, which is what it looks like is happening here. Tealium doesn't have control over this code because it isn't Tealium code. I'm sure you could update those lines and fix the problem, but I would have OL supply you the code that is needed to fix this. That way they can support the updates if they are ever needed.
Highlighted

Opinion Lab Tag - Referrer Rewrite?

Tealium Employee
Hey Jared - thanks for the update. I understand what you are saying but I took those lines of code directly out of the Tag Template through Tealium IQ so I would thing that we can make the changes here but I think you are correct in that we should check with OLab as well. FYI Opinion Lab's code manual states that if you need to rewrite the url you can add something like the following but I am just not sure where to place it. So if we want to replace the entire url to something generic we can do the following referrerRewrite: {replacePattern: 'https://www.domain.com'} If you still wanted to check this out in action you can view our feedback card here but you need to add a cookie value of wlpdesktop and set it equal to Advisor for the OL tag to trigger. https://hub2.lfg.com/hub/portalPage/afpquery?productID=H30025&defaultTab=Performance I will get something opened with the vendor. Thanks for the help!
Highlighted

Opinion Lab Tag - Referrer Rewrite?

Employee Emeritus
You took the code out of the Tag Template but at the beginning of that code it has this comment: OnlineOpinion v5.7.6 Released: 10/01/2013. That is OpinionLab's code in the Tag template. You are right. You can alter this, but the vendor's don't like it. The addition you sent would go in the extension you have set up titled "Opinion Lab - oo_conf_invite.js" It is another value in that object. Go to the end of this line in that extension: "promptDelay: 3," (line 24) Hit Enter to create a new line Paste something like the following on the new line: referrerRewrite: {replacePattern: b['dom.referrer'].split('?')[0]}, That should get you where you need without having to alter the template or OL code.
Highlighted

Opinion Lab Tag - Referrer Rewrite?

Tealium Employee
Jared, We have 2 OL tags configured in our HUB2 profile. 1 tag (18) is the standard OL tag that pops up the feedback tab. The other (38) is a separate tag that invites a specific audience to partake in the feedback (based on load rules). The extension that you mentioned is scoped specifically to tag 38 and is already using the referrerRewrite. So I am thinking what we need is another extension that maps to tag 18 that allows us to do the same. I am thinking that OL can provide the proper code for that but if you have any further insight I am all ears. Thanks for the help with this! Jim
Highlighted

Opinion Lab Tag - Referrer Rewrite?

Employee Emeritus
You're right, I didn't look at the dev OL tag. The object for this would look something like: window.oo_tab = new OOo.Ocode({ /* OPTIONAL - Configuration */ referrerRewrite: { searchPattern: /:\/\/[^\/]*/, replacePattern: '://entry.hub2.lfg.com' } }); But, yes, it would be best if this came from OL.