Stratus Billing - Legacy GA Session collection

LEGACY configuration with Google Analytics

Configuration for Google Analytics session collection has been discontinued. You may continue to use this method however in place of local session calculation from logs until [July 2023][10] on plans that were purchased before May 9th, 2022

Note: In order for your domains to be validated, the following must be met:

  1. The Domain Name Server (DNS) for the domain must be pointed to STRATUS, either via Route 53 nameservers or the proper CloudFront Distribution CNAME
  2. The domain must load in a browser and it must use an HTTPS SSL certificate as required by Cloudfront
  3. The domain must NOT be protected by HTTP Auth, Full IP restriction or block the country of the United States.
  4. A Google Analytics code must be detected on the domain
  5. Our billing system must be able to access Google Analytics data for the specific domain.

First, create a Google Analytics account, if not already created.

Once the account is created, configure the Magento install and Google Analytics for optimized tracking.

Adding a GA code to a Magento 1 Store

See Best ways to set up GA in Magento 1 from Shero Commerce for configuration of a Magento store and Google Analytics.

Adding a GA code to a Magento 2 Store

For Magento2, see Enabling GA in Magento 2

For the newer Ga4 Analytics codes, you may have to add the provided code snippet under Content-> Design - Configuration -> YOUR THEME -> HTML HEAD -> Scripts & Style sheets GA4 header

GA code types

Stratus Billing supports 2 types of GA codes. Configuration for Google Analytics session collection has been discontinued. You may continue to use this method however in place of local session calculation from logs until [July 2023][10] on plans that were purchased before May 9th, 2022

  • Universal codes: (ex. UA-1111111) Sites using these codes may use Legacy Authorization OR oAuth Validation for their GA account for billing access. The default setting is currently on Legacy. If you would like to use oAuth Validation instead, please let our support team know so we can switch the Validation type for your account.

  • GA4 codes: (ex. G-1111111) Sites using GA4 codes can only be validated via oAuth Validation. The default setting is currently on Legacy authorization. Please let our support team know if you are using one of these codes, so we can switch the validation type for your account to oAuth.

    Note: You will need to make sure that all domains on the store use the same type of GA code. A mixture of GA types will result in your domains being unable to validate. ALL domains must use Universal GA codes (ex. UA-111111) OR ALL domains must use GA4 codes (ex. G-111111).

GA Grant MageMojo access

Access must be allowed for Magento so that the stratus billing system can obtain session data from the Google Analytics account. How you grant access depends on which type of GA code you are using and which type of Authorization. Configuration for Google Analytics session collection has been discontinued. You may continue to use this method however in place of local session calculation from logs until [July 2023][10] on plans that were purchased before May 9th, 2022

GA Legacy Authorization

Grant access for Universal codes only as follows:

  1. Log into the customer account on MageMojo.com.

  2. Click on STRATUS.

  3. Choose the correct STRATUS project and environment GA Code Panel

  4. Click on Domains -> URLs & copy the email address, similar to stratus-22@stratus-173717.iam.gserviceaccount.com.

    GA Code Panel

  5. Go to https://analytics.google.com/analytics/web/#home/.

  6. Click on the correct view for the STRATUS store.

  7. Click Admin Gear Icon in the lower left. GA gear

  8. Click Account Access Management. Account Access Management

  9. Click the blue + icon and select Add Users.

    • Email AddressEnter the GA Account email address noted above.
    • PermissionsSelect “Analyst”. Add User Panel
  10. Click Add.

  11. Log into the customer account on MageMojo.com.

  12. Click on STRATUS.

  13. Click the desired STRATUS environment to expand the environment details.

  14. Click Domains > URLs in the panel.

  15. Click Validate.

button

After validation and go live, you will start to be charged based on session usage from your Google Analytics account.

Please note Default session counting from your site logs will be used if Google Analytics codes are not present or validated on your domains. These session counts currently exclude well-known bots. A session is counted as one IP address per 20 minutes.

GA OAuth Authorization

Grant access for [GA4][8] codes or UA codes as follows:

  1. Log into the customer account on MageMojo.com.
  2. Click on STRATUS.
  3. Click the desired STRATUS environment to expand the environment details.
  4. Click Domains > URLs in the panel.
  5. Click Validate. A window will launch asking you to allow Stratus access to your Google Analytics account.

button

After validation and go live, you will start to be charged based on session usage from your Google Analytics account.

Please note Default session counting from your site logs will be used if Google Analytics codes are not present or validated on your domains. These session counts currently exclude well-known bots. A session is counted as one IP address per 20 minutes.

GA Block Known Bots

Since MageMojo charges customers based on user sessions, it’s important that you filter known bots and spiders from Google Analytics so that your session usage is as accurate as possible.

To set Google to filter known bots:

  1. Log into your Google Analytics account.
  2. Go to Admin.
  3. In the View column, click View Settings.
  4. Select Bot Filtering > Exclude all hits from known bots and spiders.
  5. Click Save.

Note that your session charges may not be adjusted or refunded if you do not set Google to filter known bots.

GA Troubleshooting

Configuration for Google Analytics session collection has been discontinued. You may continue to use this method however in place of local session calculation from logs until [July 2023][10] on plans that were purchased before May 9th, 2022

  • I receive the error message Domain does not appear to be live, incorrect DNS resolution. when I attempt to validate
    This means the domain is not yet pointed to stratus.

  • I receive the error message Google Analytics Code not found when I attempt to validate
    The domain is live, but we are unable to find a reference to a GA tracking code on the page.

  • I receive the error message Unable to connect to Google Analytics View when I attempt to validate
    The tracking code is found in the page, but the API access to the GA code is denied. The following conditions can cause this error:

  • Authorization has not been granted for the correct email address.
  • You are attempting to validate a [GA4][8] code with Legacy Authorization.
  • How can I see which GA codes are on my site? The best way to see GA codes is by using Google Tag Assistant in Chrome. If Google Tag Assistant can’t see the code, then neither can the billing system.

  • 504 or timeout when attempting to validate. The following conditions can cause this error.

  • All domains on a store must use the same type of GA code. A mixture of GA types will result in your domains being unable to validate. ALL domains must use Universal GA codes (ex. UA-111111) OR ALL domains must use GA4 codes (ex. G-111111).
  • All domains on a store must have GA codes that use the same email address for authorization.
  • If you have several domains in a multistore environment, a timeout will occur if the billing system can not verify all domains within 180 seconds. If this occurs, it does not necessarily mean that any of your domains are invalidated. Please send in a ticket to support for confirmation if you are unsure of your environment’s status.
  • I have multiple environments and I can only keep one validated If you have multiple production environments and you use oAuth authorization, each account must be authorized with a different gmail account.

  • I need to remove Stratus Permissions or re-add it, how can I do so? Go to this page for the Google Account: https://myaccount.google.com/security in question. Scroll down to the “Third-party apps with account access” section. Remove the Stratus app that was authorized previously. You may reauthorize it from the Stratus Control panel URL page.


Last modified January 1, 0001