Traffic source specific A/B testing for inpage widgets
A/B testing with Trustmary's inpage widgets.
Santeri
Last Update 1 年前
- Add Trustmary tag script to your website head tag or with Google Tag Manager
- Pick and customize one of the examples below and add it to your preferred location in your website.
Example 1: Show experiment with id "EXP1234567" only if utm_campaign query parameter equals august_newsletter
For the rest of the examples use the same code, but replace getEmbedCode function with the provided example.
Example 2: Same as Example 1, but show widget with id "DEFAULT123" to visitors who are not part of the august_newsletter utm_campaign.
Example 3: Show widget with id "WIDGET1234" to visitors whose referrer includes "google.com" and widget with id "DEFAULT123" for other visitors
You can conditionally display embeds in different parts of your website by repeating the above process with different wrapperIds: tm-conditional-2, tm-conditional-3, etc.