Optibase
  • πŸ€”What is Optibase
    • πŸ§ͺWhat is a Test/Variant Group
    • πŸͺžWhat is a Variant
    • 🏁What is a Conversion
    • πŸ§‘What is a Tested User
    • 🏠What is a Guest User
    • βš™οΈWhat does the custom script do?
    • πŸ‘‘Probability to Be Best (P2BB)
  • πŸ‘·How to setup Optibase
    • ✍️Add the custom script
    • 🎯Create a Conversion
    • πŸ”—Connect a Conversion
    • πŸ–₯️Server-side Conversions
    • βš–οΈCreate a Test/Variant Group
    • πŸ†ŽCreate an A/B Variant
    • πŸ”—Connect an A/B Variant
    • πŸ”€Create a Split Variant
    • πŸ”’Force Variants
    • πŸ‘‘Turn off when a winner is found
    • πŸ”žSet up restrictions
    • ⏲️Schedule a Test
    • πŸ“¨Share test results
    • πŸ”„Connect Conversions to a Test
    • πŸ“…Filter test results by a specific time period
  • πŸͺ„Optibase Webflow App
    • ✍️Add the custom script
    • 🎯Create a Conversion
    • πŸ”—Connect a Conversion
    • βš–οΈCreate a Test/Variant Group
    • πŸ†ŽCreate an A/B Variant
    • πŸ”—Connect an A/B Variant
    • πŸ”€Create a Split Variant
    • β˜‘οΈTypes of Content You Can Connect
  • πŸ”—Integrations
    • πŸ“žActive Variants API
    • ⚑Trigger Conversions with GTM
    • πŸ“ˆGoogle Analytics 4
    • πŸ‘·Google Analytics 4 with GTM
    • βœ–οΈMixpanel
    • πŸ¦”Track conversions in PostHog
  • ❓FAQs
    • Why can you see views in the views tab for pages that don't have a test?
    • Why can't I see detailed metrics like average "Time on Page" and "Scroll Depth"?
    • Why do conversions in the Webflow app appear to disconnect randomly, and are these conversions still
    • Troubleshooting Component Connection Issues in Optibase
    • How Optibase Works with CMS in Webflow
    • Why Your Screen Flickers Before Loading the Right Variants
    • Why variants appear disconnected when inside a component?
    • Localisation Limitations in Webflow with Optibase
    • Why Conversions May Not Be Recording in Optibase
    • Does a URL Split Test Work with UTM Parameters?
    • Using Optibase Across Multiple Websites
    • Why Conversions or Results May Not Be Visible in the Results Tab
    • Can I redirect traffic between two different URLs using Optibase?
    • How do I exclude internal traffic from being counted in Optibase tests?
    • Can I connect multiple conversions to a single test?
    • How does Optibase handle geo-restricted A/B tests?
    • Why are conversion events double counted in my test?
    • How can I transfer ownership of an Optibase workspace?
    • Why do I see flickering between A/B variants?
    • Can I test elements across all pages on my website?
    • Why is a guest user still on a free plan after being invited to a paid workspace?
    • Can I redirect traffic between two different URLs using Optibase?
    • How do I set up a multivariate test in Optibase?
    • How do I exclude internal traffic from being counted in Optibase tests?
    • Why are conversion events double counted in my test?
    • Why is the wrong variant showing when I preview using the variant URL?
    • How can I force a specific variant to display for debugging?
    • How do I check which buttons are connected to a conversion event?
    • Can I run multiple tests on the same page?
    • Is it possible to set traffic allocation dynamically during a test?
    • How can I test different CTAs that exist across 50+ pages?
    • What happens when a test reaches statistical significance?
    • How do I view which conversion event was triggered?
    • Can I filter out specific IPs or users from test results?
    • Can I run tests on a site that uses a custom CMS or codebase?
    • Is Optibase compliant with GDPR?
    • Do I need to connect a conversion event to a test for it to be tracked?
    • How do I test different product pages with different pricing?
    • What if my team member can't access the Business plan features?
    • Can I test hero images with multiple slides in each variant?
    • Why does a variant not show even with 100% traffic assigned?
    • Can I export test results?
    • How do I test a new user journey that starts on different landing pages?
    • How can I preview the test without affecting analytics?
    • How do I know if my test is live?
    • How many users do I need to reach statistical significance?
    • Can I pause a test and restart later?
    • What is the difference between A/B and multivariate testing?
    • Can I run a test with just one variant?
    • Does Optibase support UTM tracking across redirects?
    • What is a 'Tested User' in Optibase?
    • How do I know when to stop a test?
    • Can I use Optibase for content localization testing?
    • Do I need to re-add conversion tracking for each new test?
Powered by GitBook
On this page
  • Step 1: Define the Conversion Event in GTM
  • Step 2: Create a Trigger for the Conversion Event
  • Step 3: Create a Custom JavaScript Tag
  • Step 4: Add a Trigger to the Tag
  • Step 5: Test Your Tag
  • Step 6: Publish Changes
  1. Integrations

Trigger Conversions with GTM

You can follow these detailed steps to set up Google Tag Manager (GTM) to trigger a Programmatic Conversion when a conversion event happens. This setup will involve creating triggers, tags, and potentially variables in GTM.

Step 1: Define the Conversion Event in GTM

First, you must define what constitutes a "conversion" in your context. This could be a page visit, form submission, button click or any other user interaction.

Step 2: Create a Trigger for the Conversion Event

  1. Go to Google Tag Manager Dashboard.

  2. Click on 'Triggers' in the left sidebar.

  3. Click 'New' to create a new trigger.

  4. Set up the trigger:

    • Choose a trigger type that matches your conversion event. For example, choose "Form Submission" for form submissions or "Click" for button clicks.

    • Configure the trigger with the necessary filters to capture your conversion event accurately. For example, if it’s a button click, you might need to specify certain button properties (like the button's ID or text).

Step 3: Create a Custom JavaScript Tag

  1. Go to 'Tags' in the GTM dashboard and click 'New'.

  2. Click 'Tag Configuration' and choose 'Custom HTML'.

  3. Enter the custom JavaScript code:

    <script>
    // Call your custom function with the appropriate conversion ID
    optibaseSendConversionEvent('yourUserFriendlyConversionId');
    </script>

    Replace 'yourUserFriendlyConversionId' with the actual ID or a variable that dynamically determines the ID based on the context of the conversion.

Step 4: Add a Trigger to the Tag

  1. In the same 'Tag' configuration screen, click 'Triggering'.

  2. Select the trigger you created in Step 2.

  3. Save the tag.

Step 5: Test Your Tag

  1. Go back to the GTM main dashboard and click 'Preview'.

  2. Navigate to your site where the conversion event can be triggered.

  3. Ensure the tag fires when the event occurs. Check the output in the GTM preview pane to confirm that the custom JavaScript function is being called as expected.

Step 6: Publish Changes

Once you are satisfied that the tag is working correctly in the preview mode, go back to GTM:

  1. Click 'Submit' to create a new version.

  2. Name your version and describe the changes.

  3. Click 'Publish' to make your changes live.

This setup ensures that every time the specified conversion event happens, your custom JavaScript function optibaseSendConversionEvent is called with the specified userFriendlyConversionId. Adjust the conversion ID dynamically using GTM variables if the ID should vary based on the conversion context.

PreviousActive Variants APINextGoogle Analytics 4

Last updated 1 year ago

πŸ”—
⚑