Connect Your Site With Google Analytics
Update: Google recently made some changes on their end, and as a result the method we use to connect to their API has been updated. The tutorial below reflects the new process.
Google Analytics is a free service offered by Google that shows you how users have found your site and how they have explored it. This service tracks visitors and has the ability to keep track of marketing campaigns.
The tutorials below will go over setting this up:
Google Analytics Tracking ID
In order to connect your website to your Google Analytics account, Google Analytics provides you with a Tracking ID that will need to be placed onto your website - this is done by placing the Tracking ID into the Google Analytics UACCT Number field in the backend under CMS > Tools > Tracking Codes.
1. Log into your Google accountBack to top
Go to this link http://www.google.com/analytics/ and click Sign in > Google Analytics. You will then be brought to the next screen to log into your Google account. These links are in the upper right corner:
2. Sign up for Google AnalyticsBack to top
***The following section only applies if you were already signed up to Google Analytics… if you had the Sign up button shown above, skip the rest of this section and proceed to Step 3.***
If you were already signed up for Google Analytics, you will instead been taken to your Analytics homepage. If so, click on Admin from the top navigation:
Next, click on the Account dropdown and select Create new account:
3. Create a new Analytics accountBack to top
Fill out the New Account form:
- Select Website at the top
- Choose an Account Name and Website Name (these can be named however you would like).
- Enter the Website URL as www.yourdomain.com and ensure http:// is selected
- Select the appropriate Industry Category (optional)
- Select your Time Zone
- It is up to you what to select for the Data Sharing Settings – read their documentation for more information regarding this (these settings will not affect the setup)
- Once it is all filled out, click the Get Tracking ID button at the bottom
You will then need to accept the Google Analytics Terms of Service Agreement to proceed:
4. Get your Tracking IDBack to top
You should be redirected to the Tracking Codes page which will display the Tracking ID for your site:
You can get to this page by clicking on Admin from the top navigation, selecting the appropriate Account and Property from the dropdown menus, clicking on Tracking Info, then Tracking Code:
5. Add your Tracking ID into the backendBack to top
Copy and paste your Tracking ID into the Google Analytics UACCT Number field of the Tracking Codes section in the backend of your website. (CMS > Tools > Tracking Codes) and click the Save Changes button in the top-right.
Congratulations! You should now be able to view your website statistics within your Google Analytics account. Please refer to their Analytics Help Center for information regarding using Google Analytics: https://support.google.com/analytics/
Proceed to the next tutorial to set up an API Key necessary in order to access the Google Analytics data from the Reports section of the backend.
Google OAuth Client ID
In addition to monitoring your site statistics directly within your Google Analytics account, you can view the Google Analytics details for your website in the backend under the Reports tab. In order to do this you will need to add a Google API key to the backend under CMS > Tools > Tracking Codes
Completing this section will also set up the Google IDX Social Connect, allowing visitors to sign up on your site using their existing Google accounts. For more information regarding IDX Social Connect, visit: http://www.realestatewebmasters.com/support/idx-social-connect.php
Also, if you previously had the Google section of the IDX Social Connect completed, these fields may already be filled in and you can skip ahead to 5. Access Google Analytics
1. Log into your Google accountBack to top
Go to this link https://code.google.com/apis/console#:services and log into your Google account
If you are not already logged in you should see...
You will need to sign in or create an account to continue. If you are already logged in proceed to the next step.
2. Turn On Analytics APIBack to top
Once you login you will be presented with on screen pop-up prompts, click "NEXT" on the first two and "DONE" on the third prompt. You will then arrive on the API Library page, where you will be able to manage your APIs (Note: you should already be seeing the API page; if not, you can reach this page by clicking on the Google APIs tab found in the top left. If instead you see a big Create project button, click on that to get started).
Search for Analytics API and click on it.
Once you select the Analytics API you will be presented with the screen to enable the API. Before you can enable, you must create a project for this API setup. Click Create Project.
Next you will be on the Create a Project screen, from here you will enter in a Project Name (If you have already created a project just select the project from the list.) Once you have filled the required fields you will need to select Create.
Next you will either see a Disable API or Enable API button near the center of the screen. If you see the Enable API button, click on it to enable the Analytics API (you may need to agree to some terms at this point). If instead you have the Disable API button, the Analytics API is already enabled and you can move on to the next step. As soon as you select Enable a message will appear below it and you will need to select Go to Credentials.
3. Create an OAuth Client IDBack to top
With updates and changes to Google API Manager there are now two ways to create a OAuth Client ID. If you followed the above steps and selected Go to Credentials then proceed with the following instructions. If you did not select Go to Credentials then click here for the secondary options.
Step 2) The next step will require you to give the Client ID a name, as well as set the URL Restrictions. You will find the required URL's on the backend of your website under CMS > Tracking Codes. Match the
3.a Create Client ID (Configure consent screen)
You should then see the Consent Screen settings which will need to be completed in order to proceed. You only need to select your email address and enter in a Product name, and then click Save (you can complete the "More Customization Options". This will be visible to people when signing up on your site using their Google account.)
3.b Create Client ID
Once you have the Create Client ID screen up,
enter in the following information:
Application type: Web application
Name: Your Name
Click on the Create Client ID button
4. Add the Client ID and Client secret into the backend
You will now have a new Client ID for web application, with a Client ID and Client secret needed to complete the setup. Copy this information into the backend under CMS > Tools > Tracking Codes into the Google API Settings section, and click Save Changes
5. Access Google Analytics
In the backend of your REW site head to the Reports section. From there click on the Access Google Analytics button, this will bring you to another page where you will need to select Connect to Google Analytics, this will prompt a final confirmation page where you will select Connect to Google Analytics one more time. If a pop-up does not display on your screen then look for a blocked pop-up and allow to proceed.
Now, you just need to click on Accept to complete the setup.
Congratulations! You should now be able to view Google Analytics through your CMS backend under the Reports tab.