简体   繁体   中英

Image tracking not working with Google Analytics

I'm trying to add Google Analytics to my newsletters - sending via email.

I found img tag logging ( <img src="https://www.google-analytics.com/collect?v=1&utmac=UA-123456789-1&ec=email&ea=open&t=event" /> - https://blog.mailtrap.io/google-analytics-for-emails/ ), but it's not working because of src link is replaced by mail engines (gmail, ymail,..).

Also, I tried to track it by opening on my own web-site: I added img tag on my web-site's main page and loaded many times, but Google Analytics did not report it (logging is working on my Google Analytics account: I've tried to add Google Analytics scripts in head and it was logged - function gtag and its scripts..).

How to use Google Analytics in mails?

Thanks

A lot of browser-based mailboxes will cache the image on their server instead. I don't think there is a way around that.

Regarding why nothing is tracking, in the link you provided as well as documentation from Google requires other parameters as well. You're missing at least the client id cid parameter, adding it should work.

You can verify with the hit builder .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM