Stratus Billing - Legacy GA Session collection
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:
- The Domain Name Server (DNS) for the domain must be pointed to STRATUS, either via Route 53 nameservers or the proper CloudFront Distribution CNAME
- The domain must load in a browser and it must use an HTTPS SSL certificate as required by Cloudfront
- The domain must NOT be protected by HTTP Auth, Full IP restriction or block the country of the United States.
- A Google Analytics code must be detected on the domain
- 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
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:
-
Log into the customer account on MageMojo.com.
-
Click on STRATUS.
-
Choose the correct STRATUS project and environment
-
Click on Domains -> URLs & copy the email address, similar to stratus-22@stratus-173717.iam.gserviceaccount.com.
-
Click on the correct view for the STRATUS store.
-
Click Admin Gear Icon in the lower left.
-
Click Account Access Management.
-
Click the blue + icon and select Add Users.
- Email Address — Enter the GA Account email address noted above.
- Permissions — Select “Analyst”.
-
Click Add.
-
Log into the customer account on MageMojo.com.
-
Click on STRATUS.
-
Click the desired STRATUS environment to expand the environment details.
-
Click Domains > URLs in the panel.
-
Click Validate.
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:
- Log into the customer account on MageMojo.com.
- Click on STRATUS.
- Click the desired STRATUS environment to expand the environment details.
- Click Domains > URLs in the panel.
- Click Validate. A window will launch asking you to allow Stratus access to your Google Analytics account.
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:
- Log into your Google Analytics account.
- Go to Admin.
- In the View column, click View Settings.
- Select Bot Filtering > Exclude all hits from known bots and spiders.
- 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.
Feedback
Was this page helpful?
Glad to hear it! Have any more feedback? Please share it here.
Sorry to hear that. Have any more feedback? Please share it here.