Global and Campaign Levels Custom Code

Created by LiRou C, Modified on Wed, 1 May at 4:16 AM by LiRou C

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:

  1. Global level: This is code that applies to the entire project.
  2. Campaign level: This code applies to the entire experiment.
  3. 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

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article