Let’s setup Genie Tracking!
Setup usually take about 10 minutes
Add the Script :Copy and paste the following script tag into the <head> section of your HTML file:
<script src="https://genietracking.com/script/tracker.min.js"></script>
Add the Script: Initialize the event tracker in your JavaScript file
window.Tracker.init(brand_id, email, { 'meta_key': 'meta_value' });
// If you do not have an email, you can initialize the tracker without it:
window.Tracker.init(brand_id, "", { 'meta_key': 'meta_value' });
This script can be put into <script onload=...> to make sure this runs after script loaded
Track Events: Use the tracker to log events in your application:
window.Tracker.track('event_name', { property: 'value' });
Verify Tracking: Verify that your events are being tracked correctly by checking the event logs in your dashboard.
Update Profile
Use the tracker to update customer profile in your application:
window.Tracker.updateProfile({ key: 'value' });
Set Metadata for Profile
Use the tracker to set metadata for customer profiles in your application:
window.Tracker.setMetadata({key: 'value'});
All-in-One Script
You can use the following all-in-one script to include the tracker and initialize it:
var script = document.createElement('script');
<script>
(function() {
<script src="https://genietracking.com/script/tracker.min.js"></script>
script.onload = function() {
window.Tracker.init(brand_id, email, { 'meta_key': 'meta_value' });
window.Tracker.track('event_name', { property: 'value' });
window.Tracker.updateProfile({ key: 'value' });
window.Tracker.setMetadata({ key: 'value' });
};
document.head.appendChild(script);
})();
</script>