Global and Campaign Levels Custom Code are advanced features designed to enhance the precision and flexibility of your A/B testing strategies within Mida.
Global Level Custom Code:
Global Level Custom Code allows you to apply JavaScript (JS) and Cascading Style Sheets (CSS) code universally across all pages with the Mida script installed. In other words, the code will apply to the entire project in Mida.
Use Cases:
- Tracking of user interactions and behaviors across the entire website.
- Applying consistent styling across all pages.
Where to find them:
- Access Global Level Custom Code settings on the Experiment page.
- Insert JS and CSS code snippets as required.
Campaign Level Custom Code:
Campaign Level Custom Code allows you to use JS and CSS code only on pages associated to a particular experiment campaign. It ensures that the JS and CSS code are shared across all variations but only runs within the experiment, not outside of it.
Use Cases:
- Tracking user interactions related to a particular campaign.
- Applying campaign-specific styling to elements.
Where to find them:
- Navigate to the Experiment Targeting page.
- Insert campaign-specific JS and CSS code snippets.
Code Call Order (Priority)
Custom code in Mida follows a specific order when it's executed:
- Global level: This is code that applies to the entire project.
- Campaign level: This code applies to the entire experiment.
- Variation level: This code is specific to each variation of the experiment.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article