Troubleshoot event tracking

Modified on Fri, 07 Jun 2024 at 09:48 PM

At times, organizations experience issues while tracking events. We have thoroughly analyzed some of those issues and provided solutions to resolve the same. Before you begin reading this article, kindly ensure that your e-commerce store or organization’s website is integrated with NotifyVisitors.

Events not getting tracked and registered within the software

Check whether event tracking is enabled

Ensure that the NotifyVisitors integration code has been properly incorporated on your online store so as to confirm that it is correctly linked with your NotifyVisitors account. Click here to learn how to perform this check.

In case you find that the integration code has been properly placed, yet the events aren’t getting registered, then check whether event tracking is turned on or is enabled within the software itself.

To do so simply:

  1. Navigate to NotifyVisitors Dashboard > Settings > Events.
  2. Under the 'Events' section you would notice that there exists a switch titled 'Life Cycle Events + Attribution Tracking'. Make sure that this switch has been toggled to its 'Active' status.

There exist two ways to verify whether the events performed on your organization’s website/online store, by your customers, are getting tracked and registered within NotifyVisitors.

Method I:

  1. Navigate to NotifyVisitors Dashboard > Settings > Events.
  2. Under the column titled 'Events Name' of the 'Events' tab, all the events tracked by the software get listed. You may even search for a specific event via the 'Search Bar' in order to quickly ascertain whether it is getting registered within the software.

Method II:

  1. Navigate to NotifyVisitors Dashboard > Analytics > Events.
  2. You would notice that there exists a dropdown titled 'Select Event' under the 'Search Events' section.

All the events being tracked by the software get listed within this dropdown. Simply enter the name of the event whose tracking you intend to check, in the dropdown’s search bar, and the event will get filtered out from the list (process illustrated in the GIF provided below).

In case you realize that certain event(s) being executed or performed on your online store aren’t getting tracked by the software, then proceed as follows to troubleshoot this issue: 

Check Error Logs

Next, check the error logs within the software. All the issues encountered by the software while tracking events on your online store, get consolidated and listed in the 'Error Logs' section. In order to check the logs simply:

  1. Navigate to NotifyVisitors Dashboard > Settings > Error Logs.
  2. This particular section lists all the events for which errors were encountered while tracking, by the software. You would notice that against each event’s name, there exist important details such as error code, error count, reason for the error, attributes associated with the event etc.

These details help you ascertain the exact cause of the error.

Moreover, for each event listed in the Error Logs section, there exists a 'Resolve' button, present in the last column titled 'Options'. Once you have resolved the root cause of the error for an event that wasn’t getting tracked, you may click on this button, in order to erase its record from this section.

This way, you can recheck whether the event for which you had formerly removed error logs, is still getting registered within this particular section or not. In case the event is getting registered again even after its record had been previously removed, then that means tracking issues pertaining to it still persist and need to be addressed. 

Make sure you resolve the cause of every error listed within the 'Error Logs' section.

Check Event Credits

Next, check whether your event tracking credits have exhausted. To do so simply:

  1. Navigate to NotifyVisitors Dashboard > Organization > Billing.

  1. Next, under the tab titled 'Billing Dashboard', check whether you have sufficient credits available within your event bucket. If not, then simply purchase or replenish your credits in order to enable the software to successfully track events being performed on your website/online store.

Additional checks

In case you weren’t able to resolve issues pertaining to event tracking by performing the aforementioned checks, then you’ll have to perform certain additional checks delineated as follows:

Static events not tracked

Check whether the URL rules are being satisfied or not

To do so simply:

  1. Navigate to NotifyVisitors Dashboard > Settings > Events.
  2. Now, click on the 'Static Events' tab and via the 'Search Bar' provided, search for the pre-configured event which isn’t getting tracked. Next, click on the 'Edit' button present under the 'Options' column (process illustrated in the GIF provided below).

  1. Check the configuration of the static event. Validate all the set parameters.

Check whether the CSS selector / Button ID / X-Path is correct

To do so simply:

  1. Perform step nos. 1 and 2 mentioned in the previous section.
  2. Check the configuration of the static event. Validate the values set for the chosen 'Selector Type'.

Note

Since, you will be performing this check for an event that will be called upon a button click performed on your online store, you would notice that within the frame the 'Button Click' option will be pre-selected and configurations will pre-exist for the same.

You would also notice that the 'Selector Type' dropdown holds three options namely Button ID, X-Path and CSS Selector. These three distinct options serve the same purpose i.e. to identify a specific button on a particular web page of your online store. No matter whichever option you select, in order for the event associated with the button to be tracked, its identifier (CSS selector/Button ID/X-Path) should be mapped correctly within the software.

In other words, the input field present against the 'Selector Type' dropdown should contain a correct value in relation to the chosen selector type option. In case you are using the X-Path selector type and you notice that even though the X-Path value of the button has been entered correctly, yet its associated event isn’t getting tracked, then kindly try using the full X-Path value.

Verify event tracking via REST API

In order to communicate properly with the NotifyVisitors API and to ensure that the information (actions/events) transmitted to it gets tracked correctly, you will need to verify the following:

Check whether the end-point or URL is correct or not

Every action you intend to track on your online store through the NotifyVisitors API, will require a specific end-point or URL for the same. 

For instance, let’s say you need to create a new user or update the credentials of an existing user, then you will have to communicate with the API via a dedicated URL devised for the same purpose, for example, in the case of the aforementioned scenario the end-point would be the one mentioned in this document.

Check whether the client is using the correct API key and Brand ID

Every NotifyVisitors account has a unique Brand ID and API key.

So, in order to ensure that events get tracked and registered within a particular account, one needs to pass certain headers including the Brand ID and API key that are specific to the account, to the NotifyVisitors API. Moreover, one needs to ensure that these headers are passed in the correct order and format as described in the NotifyVisitors support documentation.

Check whether all the parameters are being passed in the correct format

While transmitting data to the NotifyVisitors API, one needs to ensure that all the parameters hold correct values.

Verify event tracking in case of custom javascript code

You can bind custom javascript code to various elements (such as clickable buttons, links etc.) present on your official website or online shopping store. Through this custom code you can then track all the activity and actions performed in relation to those elements.

That is to say, whenever users interact with such elements, the custom code will communicate (as per preprogrammed conditions) to the software (viz. NotifyVisitors) whether to record or to not record events or data pertaining to them.

Note

For instance, let’s say you add a custom code snippet to the 'Add To Cart' button/element on your online store, and within the code you specify a condition that all activity performed in relation to this element will get recorded exclusively when products worth $500 or more are added to the shopping cart by the customer. Here, through your custom code you have specified a constraint according to which events will get tracked and recorded within the NotifyVisitors software.

However, at times flaws (such as code integration errors, syntax errors etc.) could possibly exist in such customized code snippets, which in turn might prevent proper tracking of events performed on your online store.

Kindly perform the following checks to ensure proper fetching of events/data via the custom code:

  1. Review the custom code implementation i.e. check whether the custom code has been incorporated properly and test whether the code behaves and executes as intended.
  2. Check the code for any syntax errors.
  3. Verify that the custom code is properly integrated with your official website/app.
  4. Examine the code’s logic in order to ensure that it triggers the events exclusively under programmed conditions.
  5. Debug the code (if necessary) via appropriate debugging tools/techniques.
  6. Ensure that the event tracking code is up to date and compatible with the environment it operates in.
  7. In case issues still persist, then consider consulting a developer with expertise in implementing custom code for the purpose of event tracking.

Verify event tracking via Google’s data layer

Note

The data layer is an object used by Google Tag Manager and gtag.js to pass information to tags. Events or variables can be passed via the data layer, and triggers can be set up based on the values of variables. Click here to learn more about the data layer.

  1. Examine the data layer’s configuration in order to ensure that the event data is being pushed correctly.
  2. Confirm whether the data layer’s variables being used for event tracking are correctly defined and populated.
  3. Check whether the event triggers are set up accurately as per the data layer’s events.
  4. Utilize the developer/debugging tools to inspect changes in the data layer while attempting to trigger an event.
  5. Review the data layer code for any errors such as missing data or incorrect variable names.
  6. If a data layer’s event is dependent on user interactions, verify that the user’s action triggers the expected changes in the data layer.
  7. Ensure that any relevant event listeners or data layer pushes aren’t conflicting with each other.
  8. If necessary, consult a developer or data layer expert to diagnose and resolve issues.

Faulty event tracking since the user isn’t mapped with the right event

There might exist a scenario wherein events might not be getting tracked because the user isn’t mapped with appropriate event(s). In case both the user and event code is called simultaneously, then make sure that the user code is called first and only upon receiving the response, the event is called.

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 atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article