Documentation / Product / Features / Lytics JavaScript Tag


There are a few steps to make sure the Lytics JavaScript (JS) Tag is properly installed and receiving data from your website.

Verify Lytics JavaScript Tag is Loaded

The core JavaScript tag has a helper method that will return true if all Lytics resources have been loaded properly. Open the console in Chrome Developer tools then copy and paste the following to verify that the tag has finished loaded.


Verify Data is Being Sent to Lytics

To verify that the tag is sending data to Lytics, you can check the network requests. The following steps are recommended for users testing with Google Chrome.

  1. Open the website in Google Chrome to test your Lytics JS Tag installation.
  2. Open Chrome Developer Tools and select the Network tab from the dev tools panel.
  3. Refresh the website to observe network activity on page load.
  4. In the filter textbox, type in This will narrow the list of network requests to those sent to the Lytics domain.
  5. If your tag has been successfully installed, you should see a handful of requests.

Network troubleshooting

In the above screenshot the network requests are as follows:

  • latest.min.js is the main js file for the Lytics JavaScript Tag.
  • The second request is to the Lytics Personalize API to load the profile for the current user.
  • The third request is sending a pageview event to the Lytics collector API. This is a standard event that is initiated by the JavaScript Tag on every page load.
  • Depending on your configuration you may see additional requests under this filter. For example pathfora.min.js, config.js and pathfora.min.css as seen in the screenshot above. These files will load if you have any active running web personalization Experiences. Pathfora is the Lytics Web personalization SDK, and the config file is dynamically generated by the Lytics API to serve the experiences in your account.

Verify Lytics has Received Data

An overview of all data received on any given Lytics stream in the data stream section of the Lytics UI. Unless you have configured the tag to use a custom stream, the Lytics JavaScript tag will send data to the default stream.

With the proper stream selected, check the raw keys table in the data stream section below the data ingress chart for the raw field(s) in question. You should see the standard fields collected by the JavaScript tag in addition to any custom fields you may have passed.

If you are not seeing your event in the data stream Lytics may be filtering it out or, if the data was sent recently, there could be a tag configuration issue. For assistance with debugging these types of issues, contact our support team for assistance.

Testing Audiences

You can see the audiences the current user is a member of using the following in your Chrome developer console:


This callback will return a list of audiences the user is a member of and should only be called after the user profile has loaded.

Best Practices

If you're trying to test a use case that requires a certain audience membership in the browser, follow these general tips in order to create a proper testing environment and not run into merge conflicts and false positives:

  • Always use incognito mode. An incognito window removes all cookies, caches, etc. ensuring you have no history with the site and that no email addresses share a cookie. The entirety of a test session must take place in the same incognito window so that all actions tie to the same profiles. All incognito windows must be closed between testing sessions to clear all cookies. Google provides instructions for opening an incognito window.

  • Document your testing path. Keep a testing doc that reflects the date and time of when you tested, the link of the Lytics audience you are testing, along with results and screenshots. This will assist Lytics support in tracking and debugging any issues.

Known User Audiences

If you are testing audiences that tie email and cookie actions together, you will need to perform a merge event which ties the web cookie and email together, keep the following in mind:

  • Use a test email only once, and then expire it after that. As mentioned above, document and log everything including which email address was used for each test. Google allows you to use punctuation in email addresses, while still sending to the same account. For example: [email protected] and [email protected] will both be delivered to the same inbox, however Lytics will create separate profiles for each. This will cut down on how many emails you have to create.

  • Ensure that a merge event occurs. This will tie the incognito session cookie with your test email. Here are a few examples of how you may achieve this:

    • Fill out a form that is sending an email address over to Lytics via jstag.send().
    • Open a link from an email with the email pixel embedded in an incognito window by right-clicking the link and selecting Open link in incognito window .
    • Make an API call that will force-append an email to your cookie.

Anonymous User Audiences

Anonymous user audiences consist of audiences containing anonymous users. When testing audiences that rely on the Lytics web cookie ID:

  • Find the cookie ID for your anonymous web session. You can use Google Chrome developer tools to get the cookie for your current user.
    • On the tagged website, right click and select Inspect
    • Select the Console tab
    • Enter jstag.getid(id => console.log(id)); to get your cookie/seerid This will allow you to search for it in the Find a User feature of the Lytics dashboard.

Troubleshooting Numbers

If you're troubleshooting numbers such as user counts within Lytics, check out this FAQ on why your numbers may differ and our acceptable margin of error described below.

Acceptable Margins of Error

It is common to perform quality checks against audiences in Lytics vs. your other sources of truth. In a successful implementation, Lytics can reconcile users across channels and merge profiles, which makes one-to-one comparisons tough. However, below are quality checks that can be performed to ensure that the numbers you are seeing in Lytics are matching up as expected to other common data sources:

  • Web Active Counts against Web Analytics for defined time periods (for difference in filters). Be sure your are comparing the same:
    • Time period / date range
    • Web Property
    • Taking into account employee traffic/bots
    • Comparing only audiences with a web cookie
  • Number of Subscribers by List (for profile merging -- e.g., a user may have more than one email).
    • Build various audiences in Lytics based on file sources and compare numbers to original data.

Please contact Lytics support for assistance in understanding or troubleshooting these numbers.