Freshmarketer provides an option to configure and execute certain JavaScript code before the Freshmarketer JS code. This option does not affect native site code and aids in running complex experiments involving advanced audience targeting, reusable variables, etc.


Let us assume that a site owner wants all of the collected site data to be sent to the analytics tool, Eg: Google Analytics, before the Freshmarketer JS code runs every time. For this situation, Freshmarketer’s Javascript option can be used where the corresponding code is written in the text area provided.

There are many such situations where this option is used. Some of them are,

  • Targeting multiple experiments in an organization to a specific set of similar audience,
  • Running experiments on an SPA (single-page-apps) sites,
  • Reusing custom written modules for multiple experiments,
  • Tracking custom events like mouse hover, scroll depth, etc.

Locating “Javascript” option


From Freshmarketer Dashboard, click the account name and select Project Settings.

STEP 2: 

Navigate to Javascript from the list of tabs available under Project Settings.

Technical Support
Don't see what you're looking for? Just drop us a mail