How to Use Third Party Tracking with Vine Cookie Consent Dialog and GTM
Note: Make sure your pages include the Vine script and do not have Google Analytics already installed.
Please go to the Cookie Consent pane in Web Site->Settings and turn the Use Vine Cookie Consent Dialog switch to the ON position to enable and then configure the Vine Consent dialog.
If you are using not only Vine tracking then to comply with the GDPR law you need to prevent third party tracking scripts to be loaded until the user clicks Accept in the Vine consent dialog.
If you are using Google Tag Manager(GTM) then you should configure a tag that will load the third party scripts (like Google Analytics) on the
cookie_consent event that is sent by Vine when the user clicks Accept.
For example, here is how you can load GA tracking when the visitor clicks Accept.
I. First, create a trigger that will "listen" to the 'cookie_consent' event.
In GTM, create a new trigger as follows:
- Call it “Vine cookie_consent"
- Select Custom Event as the trigger type
- Select the trigger to fire on All Custom Events
- Enter ‘cookie_consent’ as the event name
- Click Save to create the trigger.
Your trigger should look as follows:
II. In Google Tag Manager, create a new tag that will allow cookies when receiving the consent event:
- Give it a name: “Load GA on Vine consent”
- Select Google Analytics: Universal Analytics as the tag type.
- Select, for example, Page View as the Track Type.
- Select or create a new Google Analytics Settings Variable.
- Click Triggering and select "Vine cookie_consent" as a trigger that will make the tag fire.
- Save and publish in GTM.
Your tag should look as follows:
When testing you might have to wait a little before your changes appear in the browser because of cache behavior.
Please sign in to leave a comment.