Track button views and clicks as events in google analytics

后端 未结 2 1104
离开以前
离开以前 2021-01-25 00:08

I am trying to place a button that will be inside email and I want to track button views and clicks (Google Analytics events). Can you tell me if that is possible and how to do

2条回答
  •  误落风尘
    2021-01-25 00:54

    You can't technically track a button click from an email, but what you can do is control where the button links to.

    If you set the button's URL to point to your servers, you can intercept the link, send a hit to Google Analytics using the Measurement Protocol, and then redirect the user to where the button was originally pointing.

    Alternatively, you could append custom campaign parameters to the end of the URL (utm_medium, utm_source, etc.). This would allow you to know what source the hit came from. Here's some information on custom campaigns:
    https://support.google.com/analytics/answer/1033863?hl=en

提交回复
热议问题