Configure Google Analytics

Turn your website into an app in 60 seconds!
Preview My App
Jack & Jones' desktop website and mobile app.

If you are using Google Tag Manager (GTM) on your website, check our Google Analytics with Google Tag Manager guide instead.

Tracking the performance of your app is key to make sure your goals are achieved, in this guide you will learn how to adjust your website Google Analytics integration to allow you to track your app separately from your website.

Configure Google Analytics Tracking Code

Your existing Google Analytics tracking code should look like this:

	<!-- Google tag (gtag.js) -->
	<script async src=""></script>
  		window.dataLayer = window.dataLayer || [];
  		function gtag(){dataLayer.push(arguments);}
  		gtag('js', new Date());
  		gtag('config', 'G-XXXXXXXXX');

We will add a few lines of code that will add an extra user property to users who view your website through the MobiLoud app.

Here is the code that you will need to add:

		const isApp = navigator.userAgent.toLowerCase().indexOf('canvas') > -1;
		if(isApp) {
			gtag('set', 'user_properties', {
				canvas: 'true'

Your final Google Analytics tracking code will look like this after the changes:


That's it for the first part, now let's jump into your Google Analytics Dashboard.

Create a Custom Dimension

Under your Google Analytics Dashboard you will need to create a custom dimension.

Click the "Gear" icon located on the bottom left area of your screen:

Click "Custom definitions" in the "Property" column:

Click the "Create custom dimension" button:

Fill the details as follows:

  • Dimension name: canvas
  • Scope: user
  • Description: Determines if the user is viewing the website on the browser or through the app
  • User property: canvas

Save your custom dimension, and you are done!

You Need to Wait

Once you have created the custom dimension you will need to wait until a few users have opened your app, and for the data to be processed by Google Analytics, which usually takes 24 hours at least.

To clarify, you will not be able to see segment your users immediately, you will need to wait 24 hours before doing so.

Launch your brand's mobile app with a team of experts by your side.

Our team holds your hand through every step of the process to make building an app a no-brainer.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
  • Preview your app yourself or get a live demo on a call.
  • Learn about our platform and process to help you launch with minimal work required.
  • Risk free - 100% app approval guaranteed or your money back.
Only and Bestseller's iOS and Android apps.
Thank you! We'll be in touch within 48 hours :)
Oops! Something went wrong while submitting the form.
Chat icon.