How to track your landing page with Google Analytics?

Designing and publishing your landing page is just a part of the success. Now, you need to keep your finger on the pulse and track its performance to be able to react in real-time to any issues that may arise. Voucherify allows you to integrate with objectively the best tool for tracking - Google Analytics 📊

Step 1: Create a new project on Google Cloud Platform.

if you don't have an account you will be asked to create one. The account is free for 12 months and you won't be charged unless you manually upgrade to a paid plan. 

Creating an account on Google Cloud Platform

From your Dashboard, go to My Projects and select New Project.  Here, Google will automatically name your project (keep in mind that you may edit the name). Also, you will be asked to provide information about your company 🏢

Remember that you can't change the Project Name later on. 

Step 2: Enable Google Analytics APIs for your project 🔓

Next go to APIs overview from your dashboard.

Google - APIs Overview

Later, click Enable APIs which will take you to API Library 📚

Google Api library

Here we need to find two APIs - Google Analytics API and Google Analytics Reporting API.

Select the API and hit Enable ✅

Enable Google Analytics API

In order to use APIs properly you need credentials, such as key or email address, to allow smooth communication between Google API and your platform. 

Step 3: Obtain credentials for your project 🔑 

We need to create a service account which allows for server-to-server communication. After selecting the type, you'll be asked to name your service account and optionally select the role to limit access to the project for those team members who are authorised to do so.   

Creating service account key

Go with the JSON key format and hit Create. The key is going to be downloaded onto your device. Remember to keep it secured as it grants access to your project and operates like a password 🤫

Downloading credentials

Step 4: Set up Google Analytics 🏗️

Next go to Google Analytics. Select Options→User Management→Plus→Add Users.

Adding users to Google Analytics

Here we need to provide the email address that can be found in the project keys that we've just downloaded. Open this file (you can do it via normal text editor) and find "client_email". 

Client key

Copy it and paste into Google Analytics:

Google analytics email

💡 Remember to give this email address (user) a right to edit.

Step 5: Integrate Voucherify and Google Analytics 🔄

Go to your Voucherify account and select Integrations. To learn more about Integrations, go here

Google Analytics Integration

Here, you'll be asked to provide client email and private key - both of which you'll find in the file that you've downloaded. 

Integrating Voucherify and Google Analytics

Let's go back to this file and look for the client email and private key. The client email is the same one that we've posted in Google Analytics. The private key is quite long so don't be taken aback and copy everything between "..." alongside with BEGIN PRIVATE KEY and END PRIVATE KEY.

Copying the key

After setting this info up, select Google Analytics Account created at the very beginning of this tutorial.

Step 6: Attach Google Analytics to your landing page 🏷️

Now, let's go to the landing pages creator and select the landing page that you would like to track with the help of Google Analytics. 

Designing landing page

Go to Details and Releases. Here click Analytics-settings. Voucherify will automatically populate the fields with data provided at the Integration step. 

Good job 🎉 - now you should be able to track your landing page performance from your Google Analytics Dashboard

To learn more about designing landing pages, visit this article