Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // fire this snippet before the Google Tag Manager snippet everytime that page loads
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'user_status',
- 'user_id' : 'insert_user_id_here', // insert the user id like it appears in the database
- 'user_sub_status' : 'insert_user_sub_status' // 'free trial', 'canceled', 'monthly', 'yearly', 'expired'
- });
- // This event fires on any click of 'Start Free Trial' (on any button that redirects to start a free trial), no matter where it is
- window.dataLayer.push({
- 'event' : 'cta_clicked'
- });
- // This event fires when a user clicks to start the survey
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'survey_started',
- 'type' : 'optional' // insert the type of the survey optional/mandatory (as far as I know, there is no mandatory surveys on web)
- });
- // This event fires when a user clicks to skip the survey
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'survey_skipped'
- });
- // This event fires when a user finishes the survey, if the user checks the 'I am a yoga instructor' checkbox, capture that information as well
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'survey_finished',
- 'type' : 'optional',
- 'is_instructor' : 'true/false' // 'true' or 'false' depends on the answer, default value: "false"
- });
- // This event fires when a user starts the sign up (either clicks on Apple/Facebook button, or fills any of the fields for the email signup)
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'sign_up_started',
- 'method' : 'email/facebook/apple' // method of registration (how the user initiated signup)
- });
- // This event fires when a user completes the signup
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'sign_up_completed',
- 'user_id' : 'insert_user_id_here', // insert the user id from the database here
- 'method' : 'email/facebook/apple' // method of registration (how the user initiated signup)
- });
- // This event fires when a user redeems his unique code (redemption pages only)
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'code_redeemed',
- 'promo_code' : 'insert_promo_code_here' // insert promo code here
- });
- // This event fires when a user clicks to 'activate membership' if he is on a free trial or clicks on 'sign up' after his membership expired
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'activation_initiated'
- });
- // This event fires when a user finishes to 'activate membership' after his membership expired (or he is on free trial and decided to upgrade)
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- event: 'purchase', // name of the event. In this case, it always must be purchase
- ecommerce: {
- currency: 'USD', // leave static if user can only be charged with USD
- value: 29.98, // order total (excluding tax) (the amount the user paid when he activated the plan excluding tax)
- tax: 2.00, // insert tax (if available or exist in the store)
- affiliation: 'alomoves', // insert store name region here
- transaction_id: 'abc123', // transaction id
- coupon: 'ENDOFSUMMER', // if coupon was applied to the order, include it here
- items: [{ // an array with all products
- item_name: 'membership activated - monthly/annually', // monthly or annually depends on the plan the user chose
- item_id: 'membership activated - monthly/annually', // monthly or annually depends on the plan the user chose
- item_category: 'membership', // leave static
- price: 11.99, // insert an actual product price. Number or a string. Don't include currency code
- quantity: '1', // product quantity. leave static
- }]
- }
- });
- // This event fires when a user chose a payment plan, captures the payment plan chosen and any coupon code that was added
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'payment_plan_chosen',
- 'type' : 'monthly/annually', // payment plan type
- 'promo_code' : 'insert_promo_code_here' // insert promo code here, if not available then keep it empty ''
- });
- // This event fires after a user placed his credit card information on Stripe and his trial started
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event': 'trial_started',
- 'name': '14 Days Trial - Annual/Monthly', // Annual or Monthly depends on the trial he started
- 'promo_code': 'insert_coupon_name_here' // if the user used any coupon please list it here
- });
- // This event fires whenever a user completes the redeeming of membership using the GWP 30-Day Trial code
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event': 'trial_started',
- 'name': '30 Days Trial - Monthly', // users who use GWP 30-Day Trial code renew monthly
- 'promo_code': 'insert_coupon_name_here' // insert the coupon the user used here
- });
- // This event fires whenever a user completes the redeeming of membership (has to enter payment information) and gets 365 days trial
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event': 'trial_started',
- 'name': '12 Months Trial - Monthly', // it renews monthly
- 'promo_code': 'insert_coupon_name_here' // insert the coupon the user used here
- });
- // This event fires whenever a user completes the redeeming of membership (without entering payment information) and gets 365 days trial (the user has to activate the membership during or after the membership expired)
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event': 'trial_started',
- 'name': '6/12 Months Trial - Non Renewing', // 6 or 12 depends on the page/coupon
- 'promo_code': 'insert_coupon_name_here' // insert the coupon the user used here
- });
- // This event fires when a user has a class viewed (on page load of a class)
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'class_viewed',
- 'class' : 'insert_class_name_here', // insert the class name here
- 'series' : 'insert_series_name_here, // insert the series name here
- 'difficulty' : 'insert_difficulty_here', // insert the difficulty here
- 'intensity' : 'insert_intesity_here', // insert the intensity here
- 'instructor' : 'insert_class_instructor_name' // insert the instructor here
- });
- // This event fires when a user has a user saved a class
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'class_saved',
- 'class' : 'insert_class_name_here', // insert the class name here
- 'series' : 'insert_series_name_here, // insert the series name here
- 'difficulty' : 'insert_difficulty_here', // insert the difficulty here
- 'intensity' : 'insert_intesity_here', // insert the intensity here
- 'instructor' : 'insert_class_instructor_name' // insert the instructor here
- });
- // This event fires when a user adds a class to his playlist
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'added_to_playlist',
- 'class' : 'insert_class_name_here', // insert the class name here
- 'series' : 'insert_series_name_here, // insert the series name here
- 'difficulty' : 'insert_difficulty_here', // insert the difficulty here
- 'intensity' : 'insert_intesity_here', // insert the intensity here
- 'instructor' : 'insert_class_instructor_name' // insert the instructor here
- });
- // This event fires when a user has opened a series page (on page load of a series)
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'series_viewed',
- 'series' : 'insert_series_name_here, // insert series name here
- 'difficulty' : 'insert_difficulty_here', // insert the difficulty here
- 'intensity' : 'insert_intesity_here', // insert the intensity here
- 'instructor' : 'insert_class_instructor_name' // insert the instructor here
- });
- // This event fires when a user adds a series to his practice
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'series_saved', // when the user clicks the 'add to practice' button
- 'series' : 'insert_series_name_here, // insert series name here
- 'difficulty' : 'insert_difficulty_here', // insert the difficulty here
- 'intensity' : 'insert_intesity_here', // insert the intensity here
- 'instructor' : 'insert_class_instructor_name' // insert the instructor here
- });
- // This event fires when a user plays the series intro video, usually the video next to the series description on the series page
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'series_intro_played',
- 'series' : 'insert_series_name_here, // insert series name here
- 'difficulty' : 'insert_difficulty_here', // insert the difficulty here
- 'intensity' : 'insert_intesity_here', // insert the intensity here
- 'instructor' : 'insert_class_instructor_name' // insert the instructor here
- });
- // This event fires when a user views an instructor page (on page load of an instructor)
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'instructor_viewed',
- 'instructor' : 'insert_class_instructor_name' // insert instructor name here
- });
- // This event fires when a user plays a video
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'video_played',
- 'title' : 'insert_video_name_here', // insert video title (could be the name of the class)
- 'class' : 'insert_class_name_here', // insert class name
- 'series' : 'insert_series_name_here', // insert the series that video is part of
- 'difficulty' : 'insert_difficulty_here', // insert difficulty here
- 'intensity' : 'insert_intesity_here', // insert intensity here
- 'instructor' : 'insert_class_instructor_name' // insert instructor here
- });
- // This event fires every 10 seconds when a video is being played
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'video_watched_time',
- 'duration' : 10, // insert duration watched in seconds
- 'title' : 'insert_video_name_here', // insert video title (could be the name of the class)
- 'class' : 'insert_class_name_here', // insert class name
- 'series' : 'insert_series_name_here', // insert the series that video is part of
- 'difficulty' : 'insert_difficulty_here', // insert difficulty here
- 'intensity' : 'insert_intesity_here', // insert intensity here
- 'instructor' : 'insert_class_instructor_name' // insert instructor here
- });
- // This event fires each time a user views a certain threshold of duration of the video (when a user views 10% of the video, 25%, 50%, 75%, 90%)
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'video_watched_percent',
- 'percent' : 10 // or 25, 50, 75, 90
- 'title' : 'insert_video_name_here', // insert video title (could be the name of the class)
- 'class' : 'insert_class_name_here', // insert class name
- 'series' : 'insert_series_name_here', // insert the series that video is part of
- 'difficulty' : 'insert_difficulty_here', // insert difficulty here
- 'intensity' : 'insert_intesity_here', // insert intensity here
- 'instructor' : 'insert_class_instructor_name' // insert instructor here
- });
- // This event fires when a user finishes watching a video
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'video_finished',
- 'title' : 'insert_video_name_here', // insert video title (could be the name of the class)
- 'class' : 'insert_class_name_here', // insert class name
- 'series' : 'insert_series_name_here', // insert the series that video is part of
- 'difficulty' : 'insert_difficulty_here', // insert difficulty here
- 'intensity' : 'insert_intesity_here', // insert intensity here
- 'instructor' : 'insert_class_instructor_name' // insert instructor here
- });
- // This event fires when a user toggles music on a video (only when he toggles that on)
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'music_toggled',
- 'title' : 'insert_video_name_here', // insert video title (could be the name of the class)
- 'class' : 'insert_class_name_here', // insert class name
- 'series' : 'insert_series_name_here', // insert the series that video is part of
- 'difficulty' : 'insert_difficulty_here', // insert difficulty here
- 'intensity' : 'insert_intesity_here', // insert intensity here
- 'instructor' : 'insert_class_instructor_name' // insert instructor here
- });
- // This event fires when a user filters the duration
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'duration_filtered',
- 'filter_value' : 'insert_value_chosen' // insert the value of the filter that was chosen
- });
- // This event fires when a user filters the instructor
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'instructor_filtered',
- 'filter_value' : 'insert_value_chosen' // insert the value of the filter that was chosen
- });
- // This event fires when a user filters the style
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'style_filtered',
- 'filter_value' : 'insert_value_chosen' // insert the value of the filter that was chosen
- });
- // This event fires when a user filters the difficulty
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'difficulty_filtered',
- 'filter_value' : 'insert_value_chosen' // insert the value of the filter that was chosen
- });
- // This event fires when a user filters the intensity
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'intensity_filtered',
- 'filter_value' : 'insert_value_chosen' // insert the value of the filter that was chosen
- });
- // This event fires when a user uses the sort function
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event' : 'sorted_by',
- 'filter_value' : 'insert_value_chosen' // insert the value of the filter that was chosen
- });
Advertisement
Add Comment
Please, Sign In to add comment