Developer Guide For Installation
A guide to installing Zata for those who know how to code.
The following help articles will help with installation:
    For a developer with knowledge of how their product tracks user properties and events, implementation requires an hour or more of work.

Add the Zata SDK snippet

Place the following code snippet at the top of the document <head>. The Zata ID can be found on the settings page in your account
window.zataProductConfig = {
secret: "appsecret"
<script src=""></script>
"UNIQUE USER ID", // Used to identify users
name: "John Doe", // Full name
email: "[email protected]", // Email address
created_at: "1519205055" // Signup date as a Unix timestamp
// Additional user properties
// projectId: "1"
// trialEnds: '2019-10-31T09:29:33.401Z'
Make sure to add the script on every page you want to use Zata.
Re-initialize Zata upon page changes.
Zata relies on page changes to trigger content. If your application is a single page app (SPA), you'll need to use the call whenever the page changes.
If your application is not a single page app, you may still will want to use the call if your application changes a large amount of content on a page with JavaScript.

Identify users and sending user properties

In order to target content to the right users at the right time, you need to identify users and send Zata data about them.
    identify users with a unique ID
    pass in user properties (i.e. things like email address, first name, last name, etc.). You do not have to pass in any PII.
    If you're installing for someone else and they filled out an installation plan, you can use it as a reference for what user properties to include. Make sure you include at least the properties included in the user property snippet in the installation guide.
Sample identify call:

Tracking events

Use the Zata.track() call to track actions users take in your application.
Tracking events lets you target Zata content based on actions people have or have not taken in your application, and also see the impact of your flow content on user behaviors.
If you're installing for someone else and they filled out an installation plan, you can use it as a reference for what events to include.
    Recommended: If you use an analytics tool (e.g Mixpanel, Google Analytics, Heap, Hotjar, etc.), add an zata.track() call anywhere you track events for that platform.
    Ensure zata.identify() or zata.anonymous() (or the analytics.js equivalent) has been called before tracking events.
Zata.track("Event Name"); // e.g. "Clicked Some Button"
Zata.track("Another Event", { // e.g. "Submitted a Help Ticket"
url: "/support",
note: Event tracking will not backfill event data. It users completed events before they were being tracked we recommend identifying those users with a custom property.

Verify that everything is working.

Steps for verifying your installation are available on the of the installation guide.
    The verification step will list out each domain in your application where Zata has requested a script. If you want to use Zata on a domain that you don't see listed there, make sure you have added the script to the appropriate page.
    To confirm that page tracking is working, open the Zata debugger by appending ?hey_zata to the URL of any page where Zata is installed. Navigate around and confirm Zata tracks each page change.
    To confirm that user identification is working and that user properties are being sent, confirm the "User identify" section is checked in the Zata debugger. Expand the section to confirm that all properties are accurate.
    To confirm that events are being tracked, trigger one of the Zata.track() calls you added and confirm it appears on the events page in Zata.
Last modified 5mo ago
Copy link