Set Up Google Analytics with OnePlan
This article explains how to set up Google Analytics support to a OnePlan group to allow admins to track information about their OnePlan users.
Set Up Google Analytics
Follow the instructions in the article Set up Analytics for a website and/or app and/or app from Google.
Follow all of the steps in Create an Analytics account.
Follow all of the steps in Create a new Google Analytics 4 property.
Follow the first two steps in Add a data stream. Then expand the Web section and follow the instructions.
Under Set up data collection for websites, follow the instructions in the Find your "G-" ID (for any platform that accepts a "G-" ID) section. Copy your "G-" ID (Google Tag ID) and save it for use later in these instructions.
Configure OnePlan
In OnePlan, click on the Settings gear to access the Config pages.
Go to General > Advanced. Ensure the Enable Customizations checkbox is checked.
Copy the following JavaScript script:
var tag = 'YOUR_GOOGLE_TAG_ID_HERE'; function addScript( src ) { return new Promise( ( resolve, reject ) => { const scriptElement = document.createElement( 'script' ); scriptElement.setAttribute( 'src', src ); scriptElement.setAttribute( 'async', "" ); scriptElement.addEventListener( 'load', resolve ); scriptElement.addEventListener( 'error', reject ); document.body.appendChild( scriptElement ); } ); } try { addScript( `https://www.googletagmanager.com/gtag/js?id=${tag}` ).then( ( data ) => {} ).catch( ( e ) => { console.log( e ); } ); window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push( arguments ); } gtag( 'js', new Date() ); gtag( 'config', tag ); } catch ( e ) { console.log( e ); }
Go to '[my/ca/au/eu].oneplan.ai/config/js'. Paste the code into the Custom JavaScript form.
Replace YOUR_GOOGLE_TAG_ID_HERE with your Google Tag ID that you got from the previous section.
Click Save.