Highlighted

How to AB test two tags?

Rookie Contributor
 
5 REPLIES 5
Highlighted

How to AB test two tags?

Tealium Employee

Hi Chen,

 

I think this post will answer your question: https://community.tealiumiq.com/t5/Developers/Split-Segmentation-Extension/m-p/1231

 

Please don't hesitate to ask if anything is unclear.

 

Craig.

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

How to AB test two tags?

Rookie Contributor
This post is exactly what I needed. One question. I will be setting the scope of the extension to two tags. In step 5 of "Configuring the Extension", since I'm not using Pre Loader scope, so I should leave the cookie domain field blank? And what does it mean "to use the configuration domain setting"?
Highlighted

How to AB test two tags?

Tealium Employee
If you want to use the cookies set by the extension in load rules (i.e. you want to use the extension to trigger your "A" and "B" tags), then the extension must be scoped to pre-loader. Otherwise, the extension will fire after the load rules and the load rules will not work (nothing will happen - the tags will not fire). When using the extension in pre-loader scope, the auto domain setting will not work, so you'll have to use "document.location.hostname". This could probably be clearer on the documentation, so if this helps you, let me know and I'll get it updated.
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

How to AB test two tags?

Rookie Contributor
If we use "location.hostname" as the cookie domain, what happens if user goes to another page which may be served from another host?
Highlighted

How to AB test two tags?

Tealium Employee
location.hostname is your only option, unfortunately. Cookies can only be set on the current domain, so if you leave the domain and go to another one (e.g. www.tealium.com ==> www.google.com), the cookie is lost. If you have one Tealium profile that's used on both domains, the extension will run once for each domain, and the cookie will be set once per domain. The A/B test will still work the same as it does on the primary domain. Hopefully I've understood the question correctly - do let me know if you had another scenario in mind.
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.