Page tree
Skip to end of metadata
Go to start of metadata

Depending on campaign goals, you may want to track certain elements as clickthroughs so you can effectively measure impact when looking at Campaign Statistics. Often, you may need to track both clicks and actions (which can then be set up as goals) within a campaign to analyze impact.

Interaction Studio Classic Only

  • The contents of this article are intended for customers using Interaction Studio (formerly Evergage Classic) only. Do not adjust your beacon version to downgrade or upgrade.
  • The Visual Editor Chrome Extension will no longer be available starting January 1, 2023. For more information, see this knowledge article.
This Article Explains
  • What Interaction Studio tracks as click and a dismissal by default
  • Provides guidance around tracking other elements as clicks or actions
  • Gives instructions on the removal of click tracking altogether so you can optimize what you see in Campaign Statistics
Sections in this Article

Tracked by Default as a Clickthrough

The following items are tracked as clicks by default:

  • Links added by selecting Insert Element > Link (as shown at the right)
  • Linked images added by selecting Insert Element > Image
  • Any <a> tags added directly into the Message Source Code


Custom buttons, form submits, or any other custom elements are not tracked by default. You will need to add custom code to track clickthroughs on these elements.

Tracked by Default as a Dismissal

The only item tracked by default as a dismissal is the Close Icon, added by default or by selecting Insert Element > Close Icon (as shown in the images above and at the right) as long as it is set to dismiss forever.

Close buttons will count as a dismissal ONLY when they are set to permanently dismiss the message.

Tracking a Click as an Action

You can follow the instructions below to start tracking a click within a message as an action:

  1. Select Message Source Code > HTML/CSS 

  2. Locate the section of the code that you want to track as an action (i.e. the Submit button)
  3. If you have multiple links in a message and you want to track each one separately, add the code below to each link, substituting url with the link URL and TESTING with the name of the action you are tracking (i.e. clicked 'start here' link)

    <a href="url" evergage-action="TESTING">test</a>
  4. If the link you're trying to track is outside the campaign message or is being rendered by JavaScript, you can add the following code to the Message Source Code > Javascript section of the messageAfter you copy and paste the code into the Javascript editor, replace ELEMENT SELECTOR with the JQuery selector of the element you're trying to track and ACTION NAME with the action name

    Evergage.trackAction Code
    Evergage.safeClick("ELEMENT SELECTOR", function() {
        Evergage.trackAction("ACTION NAME");
  5. Click SAVE to save your campaign
  6. This action will now be available segmentation and goal creation 

Tracking will begin after the action has been completed at least once. To test that the action has been configured correctly, change the campaign state to Testing and perform the action. After a few minutes, confirm that the action is available for segmentation or searchable in REPORTS > Actions. And be aware that if you have dismissed a campaign permanently, you will have to reset dismissals to see it again. This can be done by selecting the campaign on the Campaign List screen and selecting Reset Dismissals. For more information on how to Troubleshoot Campaign Visibility, please see the linked article in this knowledge base.

Tracking an Action as a Goal

Once you create a click as an action, you can use it to create a segment from which you can create a Global Goal.

Tracking Custom Clicks

When you are tracking a custom click, determine whether it needs to be tracked as a click-only or as a click-action. If there are multiple clickable areas in your message, identify whether you need to track all of them need as a click-only or a click-action, or if there is only one specific area that you want to capture as a click-only or a click-action.

Consider what you want to see in Campaign Statistics. For example, if you have a form in a campaign, do you want to see when visitors click the form fields or only when they click the Submit button? Or, do you want to identify form fields clicks and Submit button clicks with the Submit button also identified as an Action for goal tracking purposes?

Once you have determined what you need to track, follow the instructions below to add or remove tracking. 

When adding a custom click or action tracking in a campaign, especially one with an embedded form, please contact Interaction Studio Support either before setting up the campaign or before launch.

Tracking Clicks for the Submit Button for External Forms

These instructions will help you track Submit button clicks as long as the Submit button redirects to another page (i.e. a Thank You page):

  1. Select Message Source Code > HTML/CSS 
  2. Locate the json.redirect.url portion of code 

    Inserting the custom code within this portion of the HTML/CSS will make sure that clicks are only tracked on validated form submissions
  3. Add the Evergage.trackClickthrough code below to track clicks:

    Evergage.trackClickthrough Code
    Evergage.safeClick("SELECTOR OF YOUR ELEMENT", function() {
    	Evergage.trackClickthrough("${}", window.location.href);
  4. If the CTA should be attributed to an action, add Evergage.trackAction code

  5. Click SAVE to save your campaign

Removing Click Tracking

To remove click tracking from an element that you don't want to influence your statistics, add the code below in the <a> tag for that element:

Add this code to <a>:
For example:
<a href="" 

Tracking an Element as a Dismissal 

To track an element, such as a CTA button that closes the message, as a dismissal, add the code below in the <a> tag for that element:

Add this code to <a>:
For example:
<a href="" 

Control Group Click Tracking

If your site is on Beacon Version 12 or higher, you can track clickthroughs in the control group.

  1. Expand the Message Source Code editor and select Campaign JavaScript
  2. Insert one of the code snippets, replacing "SELECTOR" with the css selector of the element you want track clicks on
Add this to Campaign JavaScript, replacing "SELECTOR"
// Tracks clickthroughs only when userGroup is "Control"
if (campaignResponse.userGroup === "Control") {
	Evergage.bindControlClickthrough("SELECTOR", campaignResponse);

// Tracks clickthroughs for ALL experiences, including Control group
Evergage.bindControlClickthrough("SELECTOR", campaignResponse);