CloudFront and Google Analytics

0

I have deployed Google Analytics Script on my Lightsail-based WordPress (bitnami) website and using CloudFront for content delivery.

Besides I am using Wordfence Firewall on my website and accordingly enabled X-Forwarded-For HTTP header as well as whitelisted all IP Blocks of Cloudfront to get users ip.

The issue I am facing is that Google Analytics is displaying all visitors as originating from the desktop devices instead of mobile devices. How I can fix it?

The link to the website is https://pricetoday.com.pk

  • Can you enable logging on all components processing requests, e.g. CloudFront and WAF, and see if original user-agent has not been changed?

1개 답변
0

GA is working as the js loaded in the page, and then, the client(browser) send requests to GA's server without passing CloudFront.

For example, you could find the js is included in your page.

Therefore, it would be surely better if you check it with Google.

profile pictureAWS
Kenex_H
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인