

Mason
Forum Replies Created
-
Mason
Member15 March 2023 at 3:45 pm in reply to: How to filter out bot and spike attack traffic in GA4 analyticsYes, bot traffic can indeed impact analytics and skew your data. To solve this issue in GA4, you might want to explore the following options. First, GA4 does have an inbuilt bot traffic exclusion in the settings; make sure this is activated. Next, explore the ‘Events’ section in GA4 and set up custom parameters for analytics tagging. This can help you filter out non-engaging, suspicious traffic. Finally, consider using Google Tag Manager, and set it up to filter out traffic with no engagement metrics. These actions should help to limit the amount of bot traffic appearing in your GA4 analytics.
-
Mason
Member25 February 2023 at 5:49 pm in reply to: Maximizing Security: Integrating Google Analytics/Google Ads with CSPTo get Google Analytics (GA) and Google Ads to run with Content Security Policy (CSP), you need to allow specific URIs in your policy directive. These include ‘www.google-analytics.com’, ‘googletagmanager.com’, ‘adservice.google.com’, and ‘googleads.g.doubleclick.net’.
However, handling inline scripts sourced from GA might get a bit challenging. You have two options to handle this. First, use a nonce (number used once) to whitelist the inline script. The nonce must be generated anew for every HTTP response, which can not be a straightforward method and cause latency issues.
Second, use the ‘unsafe-inline’ directive. But note, this is not recommended due to security reasons as it allows all inline scripts making your site vulnerable. If you must use it, make sure only to allow inline scripts and styles from trusted sources.
One innovative method mentioned in that article involved using a service worker to inject Google Analytics. However, this method isn’t simple and should only be employed if you’re proficient in service worker functionality.
Remember that while CSP is a powerful defensive tool for site security, it can make things difficult when you need to integrate third-party services such as GA or Google Ads. Strike a balance between security and functionality to create a high-performing website.
-
Mason
Member19 February 2023 at 2:22 pm in reply to: Time Tracking in Google Analytics 4 for Purchase EventsGoogle Analytics 4 doesn’t appear to store the exact time for eCommerce events by default. The precise time tracking you’re looking for might involve a bit of custom work with JavaScript variables. While that could be more intricate, it’s currently the recommended way to capture detailed timestamps. Many people wish GA4 took care of this automatically, but for now, you might need to look into custom solutions.
-
Mason
Member12 December 2022 at 8:45 pm in reply to: Understanding the Functionality of the ecommerce Property in GTM EventsActually, you’re right. The main difference between gtag.js and dataLayer has to do with flexibility and reusability. Using DataLayer is preferred because it’s a more flexible option, especially if you’re not only using Google Analytics, but also tools like Facebook Pixel or other third-party pixels.
All these tools share similar Ecommerce features like view_item, add_to_cart, purchase, etc. When you use DataLayer, you only need to populate the ‘items’ once, and you can reuse it for other pixels as needed.
Whereas with gtag.js, it’s more restricted – it will only apply the function to Google Analytics and Google Ads. So if you need to implement say, Facebook Pixel in the future, you’ll have to start all over from scratch.
Using Data Layer makes things much simpler, especially for websites with a complex tracking setup. Not only does it prevent redundancy, but it will make your life a lot easier in the long run. It’s all about planning and reducing future workload!