Highlighted

_setCookiePath in Tealium Google Analytics Classic tag in marketplace

Rookie Contributor
I has a custom configuration that needs set the cookiePath method for isolate a set of cookies for a specific account. The method doc: https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiDomainDirectory#_ga... Tealium dont shows this option in default configuration. How do i set this method to my tag?
4 REPLIES 4
Highlighted

_setCookiePath in Tealium Google Analytics Classic tag in marketplace

Employee Emeritus

Hi Ronaldo, Tealium has an extension called "Persist Data Value Extension" where you can set cookies on a page of your choice. Within this extension, you can scope it to run for the Google Analytics tag. You can read more about it from this article: https://community.tealiumiq.com/t5/Tealium-iQ/Persist-Data-Value-Extension/ta-p/13623. What type of use-case are you trying to achieve on the specific account? Is this for another Google Analytics account? Let us know if you have additional questions.

Highlighted

_setCookiePath in Tealium Google Analytics Classic tag in marketplace

Rookie Contributor
My environment has two tags: 1 - A tag for crossing all domain: www.site.com/.* 2 - A tag for specific path, for instance, www.site.com/path/.* When user hits the home page, one tag is sent When user hits the path page (/path/), we need send the first tag and the path tag. I wish to replicate this behavior: url exemple: www.site.com/path/article/article-name <script> ... ['_setAccount', 'UA-xxxxxxx-x'], ['_setDomainName', '.subdomain.domain.com'], ['_trackPageview'] ['prefix._setAccount', 'UA-xxxxxxx-x'], ['prefix._setDomainName', 'subdomain.domain.com'], ['prefix._setCookiePath','/path/'], ['prefix._trackPageview'] ... </script> Another way of set this in Tealium could be putting the entire tag in a blank field. I will look in details how extensions works. Thanks.
Highlighted

_setCookiePath in Tealium Google Analytics Classic tag in marketplace

Tealium Employee
The best way to do this would actually be to use a javascript extension with the following contents: {code:javascript} window._gaq = window._gaq || []; window._gaq.push(['_setCookiePath', '']); {code} Scope the extension to the GA tag. The persist extension can't help here - you need to use Google's _setCookiePath method.
Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.
Highlighted

_setCookiePath in Tealium Google Analytics Classic tag in marketplace

Rookie Contributor
Thank you Craig, this solution works! In a environment that we have 30 "sub-sections or paths" and i need to track all, the best practice is create one extension for each path, sure? PS: each path refers to one different tag. I have this question because following this model, we will have a lot of extensions and it can affect the site performance. Thank you again Best regards,