Highlighted

Is there no setting to map a custom cookie name to the Google Analytics Tag?

Bronze Contributor
Bronze Contributor

Hey,

I'm looking for the mapping option of the cookie name for the Google Analytics (analytics.js) tag. It seems there is no such option. The docs also don't list the cookie name parameter for the tracker object next to other common parameters like cookie domain. Am I overlooking something?

Best regards,

David

 

3 REPLIES 3
Highlighted

Is there no setting to map a custom cookie name to the Google Analytics Tag?

Tealium Expert
Tealium Expert
Hi @DavidRicharz - you can always free-form type in custom variable names when mapping in a tag. Then you'll want to to a through debug to see that the variable is picked up and used by your tag. You may also need to experiment with scope if you are using an extension to set the variable to ensure the data is available when the tag fires.

Looking forward to others chiming in, and/or to hear more about your experience with this.
Highlighted

Is there no setting to map a custom cookie name to the Google Analytics Tag?

Bronze Contributor
Bronze Contributor

I just tested mapping a custom cookieName via a custom value mapping:

Mapping within GA TagMapping within GA Tag

 

 

 

The naming follows the convention in the GA docs.

However testing on a dev site the client id still gets written to the standard _ga cookie. This can also be verified by looking at the tracker ga object:

Cookie name in ga tracker objectCookie name in ga tracker object

Since similar parameters are available (like cookieDomain) I wonder why there is no standard implementation for the name.

 

Highlighted

Is there no setting to map a custom cookie name to the Google Analytics Tag?

Tealium Employee

Hi @DavidRicharz 

The marketplace tags provide a template that you may customized to suite your integration of a vendor.  If you are using the legacy 'analaytics.js' Google Analytics tag then you may edit the template looks like if you add c.cookieName = 'somename' to the template's  u.initTracker function then you should be good to go.  I have not tested this as you should when making edits to any template.

GUA_Template.js 2020-06-05 09-58-29.png

Please reach out to support@tealium.com to start a support ticket if you need assistance making the edit and test.

Thanks and regards

Robert