BILLmanager 6

Integration with Google Analytics

Integration with Google Analytics (GA) allows a service provider to collect information about clients, ordered services, etc, in the GA Client area.

BILLmanager configuration

You need to set up Integration with GA for every provider: ProviderProviders → select a provider→ EditGoogle Analytics configuration:

  • Use Google Analytics 4 — enable this option to use Google Analytics 4 instead of Universal Analytics (Google Analytics 3);
  • Data Stream ID — you can get the data from the analytics page of Google Analytics Accounts:
    • Google Analytics 4 — Specify the Data Stream ID in Google Analytics. This is a sequence of characters in the format "G-YQXYQ1YQ23";
    • Google Analytics 3 — Specify the Data Stream ID in Google Analytics. This is a sequence of characters in the format "UA-123456-7";
  • API private key — specify the private key for Measurement Protocol. Google Analytics 4 only;
  • User ID — select the checkbox to send the BILLmanager client id as the User ID to Google. 
  • Export type — select what information will be sent to Google:
    • Disabled — do not export the information. 
    • Expenses — export information about all client's expenses.
    • Services — export information about all client's services. The information per service will be exported only once, regardless of the amount of expenses related to that service. 
  • Trial services — select the checkbox to upload information about trial services.

Setting up data collection for the website

To customize the way data is received from BILLmanager, add the Google tag:

  1. Get a Google tag in your Google Analytics account. For more details, see the Google Analytics documentation.
  2. Go to BILLmanager and enter ProviderBrandingHTML insert or Provider → select a provider → click BrandingHTML insert.
  3. Copy the Google tag into the "body" field with your data stream ID.
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=Data_Stream_ID"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'Data_Stream_ID');
</script>

Google Analytics 3 configuration

In "Google Analytics Accounts" go to Admin → ViewEcommerce Settings to activate E-commerce settings and Enhanced Ecommerce settings.

Information export

The  'BILLmanager export to Google Analytics'  task is started in crontab to export information:

## BILLmanager export to Google Analytics
*/10 * * * *    /usr/local/mgr5/sbin/mgrctl -m billmgr google.analytics.export

By default, the operation starts every 10 minutes.

The uploaded statistics are stored on the Google Analytics website: Summary of ReportsMonetization.