Once installed, the Tracker enables us to monitor where your signups are coming from, as well as what they do within your product during their trial.

When someone signs up and you have their User record, populate the user and custom_properties sections with information about that user.

Important: The customer_id field should be the ID of the customer on your Subscription Provider's platform (Stripe in your case).

JavaScript

Step 1

To install the OnboardFlow Tracker on your site. Paste the code below into the HTML of your site, before the closing </head> tag.

Copy
<script type="text/javascript" id="of-loader">
window.onboardFlowSettings = {
"site_key": "f37F2PPh",
"user": {
"id": "", // Your internal User ID for the logged in user
"customer_id": "", // The payment providers Customer ID for the logged in user
"email": "", // Email address of the logged in user (optional)
"image_url": "" // Profile Image URL of the logged in user (optional)
},
"custom_properties": {
'time_in_onboarding_minutes': 0,
'followers_total_number': 0,
'total_posts_scheduled': 0,
'pending_campaigns': 0,
'approved_campaigns': 0,
'social_profiles': 0,
'clicks': 0,
'sites': 0
}
};


(function() {var po = document.createElement("script"); po.type = "text/javascript"; po.async = true;
po.src = "https://media.onboardflow.com/gen/tracker/f37F2PPh.min.js";
po.onload = po.onreadystatechange = function() {var rs = this.readyState; if (rs && rs != 'complete' && rs != 'loaded') return;
OnboardFlowLoader = new OnboardFlowLoaderClass(); OnboardFlowLoader.identify(window.onboardFlowSettings);};
var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s);})();
</script>

Step 2

When someone signs up and you have their User record, populate the user and custom_properties sections with information about that user.

Important: The customer_id field should be the ID of the customer on your Subscription Provider's platform (Stripe in your case).

For further guidance, either contact our support team or read the setup guide.
Google Tag Manager

Setting up your OnboardFlow tracker to run within your Google Tag Manager container can be achieved in a few simple steps. Head to our Google Tag Manager setup guide for full instructions.

1. Data Layer

Copy and paste the below Data Layer code, when asked to do so in our setup guide.

Copy
<script type="text/javascript" id="of-dl">
window.dataLayer = window.dataLayer || [];
dataLayer.push({
"site_key": "f37F2PPh",
"user": {
"id": "", // Your internal User ID for the logged in user
"customer_id": "", // The payment providers Customer ID for the logged in user
"email": "", // Email address of the logged in user (optional)
"image_url": "" // Profile Image URL of the logged in user (optional)
},
"custom_properties": {
'time_in_onboarding_minutes': 0,
'followers_total_number': 0,
'total_posts_scheduled': 0,
'pending_campaigns': 0,
'approved_campaigns': 0,
'social_profiles': 0,
'clicks': 0,
'sites': 0
}
});

</script>

2. Custom Tag Code

Copy and paste the below Custom Tag code, when asked to do so in our setup guide.

Copy
<script type="text/javascript" id="of-loader">
window.onboardFlowSettings = {
"site_key": "f37F2PPh",
"user": {{OnboardFlow_User}},
"custom_properties": {{OnboardFlow_CustomProperties}}
};

(function() {var po = document.createElement("script"); po.type = "text/javascript"; po.async = true;
po.src = "https://media.onboardflow.com/gen/tracker/f37F2PPh.min.js";
po.onload = po.onreadystatechange = function() {var rs = this.readyState; if (rs && rs != 'complete' && rs != 'loaded') return;
OnboardFlowLoader = new OnboardFlowLoaderClass(); OnboardFlowLoader.identify(window.onboardFlowSettings);};
var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s);})();
</script>

3. Populate the Data Layer

When someone signs up and you have their User record, populate the user and custom_properties sections within the Data Layer code snippet (above) with information about that user.

Important: The customer_id field should be the ID of the customer on your Subscription Provider's platform (Stripe in your case).

For further guidance, either contact our support team or read the setup guide.
It looks like you have already installed the tracker, but if you need any further assistance populating it, let us know.