Forum Replies Created

  • Finley

    Member
    5 July 2023 at 5:33 am in reply to: Understanding PHP Implementation of the Google Analytics API

    Without being able to see the PHP code snippet and output snippet mentioned, providing a precise solution is challenging. However, generally speaking, once you’ve created a new property using Google’s Analytics PHP API, the propertySummary list should indeed include this newly created property. If it doesn’t, you may want to check that the property was successfully created and there were no errors in the process. Keep in mind it might involve some latency for the new property to appear. Also, check to ensure that your code properly refreshed or re-retrieved the list of properties after the creation of the new property. Lastly, always confirm if your Google account has the necessary permissions to create and view properties.

  • It seems that you’re encountering a common issue within BigQuery and JSONL format. First, JSON by nature does not maintain the order of its keys (or in this case, columns). This is a property of the data structure itself, since JSON objects are unordered sets of key-value pairs. Hence, the issue you are experiencing with the column order being different after export and import.

    Secondly, concerning missing NULLs in your JSON file. NULLs are typically not included in JSON data due to normalization, to save on space and increase efficiency. This is actually a common practice in JSON serialization and not limited to Google BigQuery or GA4. Consequently, when you export data to JSONL and there are NULL values, those keys are usually not included in the serialized JSON object.

    To work around this, you need to address these nuances during the import/export process. For example, if you require NULLs to be present in the JSON document, you may need to perform a preprocessing step to fill NULLs with a default value before exporting. To address the issue with column order, you will have to enforce that explicitly during the import process, as the order is not preserved naturally in JSON/JSONL format.

    However, you’ll need to be aware that these adjustments could potentially alter the data structure and possibly affect your data analysis and further processing of these data.

  • It sounds like you have correctly set up Google Tag Manager and GA4 for your single page application, but are having trouble seeing the page views in your network. There could be various reasons for this issue. It could relate to certain blockers, e.g., ad blockers or privacy extensions that might prevent the correct data from being sent to Google Analytics. Another reason could be incorrect or conflicting set ups in GA4 and GTM. For example, make sure your GA4 configuration tag in GTM is correctly set up to fire on all pages or accordingly to your desired triggers. Also check your triggers, variables and tags; they should be properly configured. If the configuration is correct but you’re still having issues, it may be beneficial to seek professional help or reach out to Google support.

  • Finley

    Member
    24 January 2023 at 12:34 pm in reply to: Improving Google Analytics Audience Creation with Regex

    The first regex you’ve written includes a “$” symbol after each term which means it will only match entries that end with the specified term. Consequently, this may exclude matches where there are additional characters or words after the term in your event names. Also, there appears to be a discrepancy between the list of terms you’ve mentioned initially and in your regex. For instance, you mention “Cappuccino” in your initial list but feature it only in your second regex. Therefore, it’s recommended to use a single regular expression that includes all your terms and eliminates the “$” symbol. This could look like this: ^(Cappuccino|Flat White|Mocha|Latte|Americano|Ovaltine|Bubble Milk|Croissant|Sugar Loaf|Thick Toast|Mini Donuts|Ciabatta|Pizza Bread|Baked Pasta|mousse cake|cheesecake|tiramisu). Be careful to match the case because regex can be case-sensitive. If there are still issues, scrutinize your data to ensure these item_names exist as you expect. If the audience pool is still smaller than anticipated, it’s possible some of your events are not being caught or there might be other discrepancies in your data.

  • The disparate number of results you’re seeing between adMatchedQuery for UA (Universal Analytics) and sessionGoogleAdsQuery for GA4 (Google Analytics 4) could potentially be due to various factors. One key reason could be a difference in the time range that has been selected for these queries. Another reason could be because GA4 doesn’t use the session model like UA does, so they might be counting or categorizing queries differently. Furthermore, the difference could be in the source, meaning GA4 might be collecting and showing more data from broader channels compared to UA. It’s also worth making sure that the same filters and parameters are being applied in both cases to ensure an accurate comparison. Lastly, do note that GA4 is much newer than UA, hence there might be discrepancies due to system updates or differences in data processing.