Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utilize GTM's built-in YouTube tracking due to issue with GTM4WP's YT tracking issues #7

Open
KZeni opened this issue Oct 17, 2019 · 0 comments

Comments

@KZeni
Copy link
Contributor

KZeni commented Oct 17, 2019

I encountered trying to have GTM4WP's YouTube tracking enabled, but it was giving me and error that getVideoData() was undefined (with all other aspects matching exactly what was known as needed.)

As such, I'm thinking this could probably use YouTube Videos as a trigger and tag which takes advantage of GTM's built-in YouTube tracking rather than relying on GTM4WP's potentially problematic setup for YT tracking.

Again, the triggerId & tagId didn't match up from my export so I didn't have a pull request ready.

That said, I have

                "name": "YouTube Videos",
                "type": "YOU_TUBE_VIDEO",
                "fingerprint": "1571180531182",
                "parameter": [
                    {
                        "type": "TEMPLATE",
                        "key": "progressThresholdsPercent",
                        "value": "10,20,30,40,50,60,70,80,90"
                    },
                    {
                        "type": "BOOLEAN",
                        "key": "captureComplete",
                        "value": "true"
                    },
                    {
                        "type": "BOOLEAN",
                        "key": "captureStart",
                        "value": "true"
                    },
                    {
                        "type": "BOOLEAN",
                        "key": "fixMissingApi",
                        "value": "true"
                    },
                    {
                        "type": "TEMPLATE",
                        "key": "triggerStartOption",
                        "value": "DOM_READY"
                    },
                    {
                        "type": "TEMPLATE",
                        "key": "radioButtonGroup1",
                        "value": "PERCENTAGE"
                    },
                    {
                        "type": "BOOLEAN",
                        "key": "capturePause",
                        "value": "true"
                    },
                    {
                        "type": "BOOLEAN",
                        "key": "captureProgress",
                        "value": "true"
                    }
                ]

as part of the YouTube Videos trigger.

Meanwhile

                "name": "YouTube Videos",
                "type": "ua",
                "parameter": [
                    {
                        "type": "BOOLEAN",
                        "key": "nonInteraction",
                        "value": "false"
                    },
                    {
                        "type": "BOOLEAN",
                        "key": "overrideGaSettings",
                        "value": "false"
                    },
                    {
                        "type": "TEMPLATE",
                        "key": "eventValue",
                        "value": "{{Video Current Time}}"
                    },
                    {
                        "type": "TEMPLATE",
                        "key": "eventCategory",
                        "value": "video - {{Video Provider}}"
                    },
                    {
                        "type": "TEMPLATE",
                        "key": "trackType",
                        "value": "TRACK_EVENT"
                    },
                    {
                        "type": "TEMPLATE",
                        "key": "gaSettings",
                        "value": "{{GA config - with ecommerce}}"
                    },
                    {
                        "type": "TEMPLATE",
                        "key": "eventAction",
                        "value": "{{Video Status}}"
                    },
                    {
                        "type": "TEMPLATE",
                        "key": "eventLabel",
                        "value": "{{Video Title}} {{Video URL}}"
                    }
                ],

is part of the YouTube Videos tag.

You can see how the event labelling is largely based on the previous GTM4WP-based event setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant