1
votes

Is it possible to use a video (brightcove) trigger for the google tag manager?

What should I configure on Google Tag Manager to send a video play event on Google Analytics (including autoplay). On Google Tag Manager I can't find any video trigger. Should I send the events without Google Tag Manager straight to Google Analytics with a request?

<amp-brightcove
                  data-account="906043040001"
                  data-video-id="1401169490001"
                  data-player-id="180a5658-8be8-4f33-8eba-d562ab41b40c"
                  layout="responsive" width="480" height="270">
</amp-brightcove>

amp video analytics page: https://github.com/ampproject/amphtml/blob/master/extensions/amp-analytics/amp-video-analytics.md

amp-brightcove: https://ampbyexample.com/playground/#url=https%3A%2F%2Fampbyexample.com%2Fcomponents%2Famp-brightcove%2Fsource%2F

2

2 Answers

0
votes

There is an Brightcove example page. http://solutions.brightcove.com/bclifford/ampexamples/analytics.html

<amp-brightcove
  id="myPlayer"
  data-account="myAccountId"
  data-player-id="myPlayerId"
  data-embed="default"
  ...
>

<amp-analytics>
  <script type="application/json">
    {
      "requests": {
        "base": "https:/www.something.com/?",
        "pageview": {
          "baseUrl": "${base}type=pageview"
        },
        "event": {
          "baseUrl": "${base}type=event&name=${eventName}"
        }
      },
      "triggers": {
        "trackPageview": {
          "on": "visible",
          "request": "pageview"
        },
        "myVideoPlay": {
          "on": "video-play",
          "request": "event",
          "selector": "#myPlayer",
          "vars": {
            "eventName": "play"
          }
        },
        "myVideoEnded": {
          "on": "video-ended",
          "request": "event",
          "selector": "#myPlayer",
          "vars": {
            "eventName": "end"
          }
        },
        "myVideoSession": {
          "on": "video-session",
          "request": "event",
          "selector": "#myPlayer",
          "vars": {
            "eventName": "session"
          }
        }
      }
    }
  </script>
</amp-analytics>
-2
votes

No, in AMP GTM, you're limited to only certain trigger events. Unless you can utilize the click trigger.