Add the Ringostat number insertion script directly into your web page code to set up call tracking on your web page.
1. Check if you set up the Universal Analytics script.
First, check if you've already inserted the Google Analytics script into your web page code.
Go to your web page. Click the mouse's right button and select "View page source".
Once you open the web page code, click Ctrl+F and enter "https://www.googletagmanager.com/gtag/js" in the search line.
If you didn't find it, you should first set up this script in your web page code.
If you found it — go to the next step and set the number insertion script.
2. Insertion script
Copy the template for the adapted script for this version of Google Analytics:
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXX-Y"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-111111-1', {'send_page_view': false});
</script>
<script>
function initRingostat(){
if (typeof(ga) !== 'undefined') {
ga('gtag_UA_XXXXXX_Y.require','ringostat');
gtag('event', 'page_view');
(function (d,s,u,e,p) {
p=d.getElementsByTagName(s)[0],e=d.createElement(s),e.async=1,e.src=u,p.parentNode.insertBefore(e, p);
})(document, 'script', 'https://ringostat.com/numbers/v4/XX/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.js');
} else {
setTimeout(initRingostat,200);
}
}
initRingostat();
</script>Instead of
UA-XXXXXX-Y
put your real Google Analytics source ID.After that, in the field
gtag_UA_XXXXXX_Y
changeUA_XXXXXX_Y
to your real Google Analytics source ID using underscore.For example, if your Google Analytics source ID is
UA-111111-1
, then you should putgtag_UA_111111_1
.Then change
https://ringostat.com/numbers/v4/XX/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.js
to the script link, which you can find in your project settings.
Your script should look like this after all changes: