API Credentials
Last updated
Was this helpful?
Last updated
Was this helpful?
To set up your API, you must navigate to the "admin" section of the platform.
Click the menu icon, then select "administration."
Once there, select "API Credentials".
The admin page for event API setup has a six-step process to set up your API and also allows you to add a new product if one doesn't yet exist on the platform.
Once on this page, click the "add API key" button.
This will show a dropdown list, if you have existing products in Zentitle2 or Zengain they will show here. There are no existing products in this case, so we need to add one using the "add product" button found when clicking the arrow in the dropdown box.
Enter a unique name and click save
Add a short but unique "key name" to reference this API later.
Click "create".
Now we have the API key ready to copy using the copy button on the right of the box.
Click close to return to the API page.
Next, click the copy snippet button to see the script to attach to your application
Copy the JS Snippet using the copy button on the right of the box.
Click "next".
Open your application in your editor.
Paste the snippet you copied into this location.
Click Next in the Zengain setup page.
Please note the "required" elements in the configuration setup above.
Next, copy and then edit the config. script.
Replace 'YOUR_API_KEY' in the snippet 'initialize' method with the API key you created in the previous step, and configure additional parameters in the initialization call to set up essential tracking data.
Click Next in the Zengain setup page.
You can track custom events in the app using the track
method, allowing you to monitor specific user actions like button clicks or form submissions. Standard events pageView
are tracked automatically, and tracking provides flexibility for capturing key interactions.
Add custom event tracking to your app. If you are using it (recommended).
Click Next in the Zengain setup page.
After adding and configuring the snippet, verify that it's correctly installed.
Click End in the Zengain setup page.
Step 1: Open your site in a browser.
Step 2: Open the browser's Developer Tools (F12 on Windows, Cmd+Opt+| on Mac).
Step 3: Check the Console tab for any errors related to the Zengain JS Snippet.
Step 4: to check if the Status has changed to green, which means that Zengain has received the first event.