View difference between Paste ID: 1M7bxkLa and EAmSV3SM
SHOW: | | - or go back to the newest paste.
1-
// Fire this event when a user successfully upgrades from the free plan to a paid plan.
1+
//Fire this event on every page load before the Google Tag Manager container loads. Fire it only if user is logged-in.
2
3
<script>
4
window.dataLayer = window.dataLayer || [];
5
window.dataLayer.push({
6-
 'event': 'free_to_paid',
6+
 'event': 'user_info',
7-
 'user_plan': 'pro',  //Variable value based on the plan the user selected. E.g. "basic", "pro", etc.
7+
 'user_plan': 'pro',  //Variable value. E.g. "free", "basic", "pro", etc.
8-
 'payment_frequency': 'monthly',  //Variable value. E.g. "monthly" or "annually".
8+
 'total_items': '12',  //The total count of items that a user has in the platform.
9
 'user_id': 'asdf1234'  //User ID from your website database.
10
 });
11
</script>