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.

This Article Explains
  • What Evergage 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. Add the code below, substituting Action Name with the name of the action you are tracking and other elements with their respective values

    Evergage.trackAction Code
    Evergage.safeClick("SELECTOR OF YOUR ELEMENT", function() {
    	Evergage.trackAction("Action Name");
    <a href="url" evergage-action="TESTING">test</a>
  4. Click SAVE to save your campaign
  5. 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.

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 Evergage 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 j son.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=""