integration with google analytics · to integrate freshmail with google analytics, you will need:...
TRANSCRIPT
Email Marketing Automation: Integration with Google Analytics
FreshMail Email Marketing Automation: Integration with Google Analytics 1
To integrate FreshMail with Google Analytics, you will need:
1. An active FreshMail account. If you don’t have one yet, you can open it here. 2. A Google account that has access to Google Analytics.
Step 1 To start the integration, log in to your Google Analytics account and go to Step 2 of the instructions below. If you need to open a new Google Analytics account, follow the steps below. Go to https://www.google.com/analytics/, click on Sign and then Google Analytics in the upper right hand corner of the screen and then Sign up on the right hand side.
Next, fill in the form to configure the data from your page. Select:
Account Name, Website name and Website URL, Industry Category and Reporting Time Zone.
FreshMail Email Marketing Automation: Integration with Google Analytics 2
Here’s an example of a completed form:
Scroll down and click Get Tracking ID. You will be asked to accept the terms of use of Google Analytics. Click I accept. Then save your Tracking ID in a notepad because you will need to copy it in Step 7. After saving your Tracking ID, proceed to the next step.
FreshMail Email Marketing Automation: Integration with Google Analytics 3
Step 2 On the main page panel in Google Analytics, select the Admin tab and then Property: Custom Definitions from the middle column.
After clicking Custom Definitions, choose Custom Dimensions from the list that appears.
In the new window, click the red +New Custom Dimension button.
FreshMail Email Marketing Automation: Integration with Google Analytics 4
It may happen, however, that this button will not be visible to you. This can be a result of the fact that you do not have full access to the Google Analytics account. This situation occurs when you are given access to an existing account instead of starting your own, as can sometimes happen when one account is shared in a business. In order to complete this step of the integration you will need editing privileges. Ask the administrator to give it to you. The parameters that you should set are:
an easy to remember name for the new dimension that you are creating and scope: user.
After entering the data, click Create.
In the next step, select Done.
FreshMail Email Marketing Automation: Integration with Google Analytics 5
The new dimension that you created will be assigned to a number in the table that you can see below. The index depends on whether or not you created nonstandard dimensions earlier. Save The index because you will need it in Step 7. In the example below we created a FreshMail_EMA_Dimension in the second index position in the table. You can also define more dimensions, all of which will be available in FreshMail for use after integration.
Step 3 The next step is activating UserID tracking in Google Analytics. Return to the Admin tab and in the middle menu (Property), select Tracking Info and then UserID.
FreshMail Email Marketing Automation: Integration with Google Analytics 6
In the second point of the Enable the UserID feature section, accept Session Unifcation and select ON. If you are setting function for the first time, confirm that you are also aware of the terms of use in the first point.
Next select the Next step button. You can now go to the last button, Create, in accordance with the graphic below:
FreshMail Email Marketing Automation: Integration with Google Analytics 7
The last window that you see in this step of the integration is connected with the creation of a new view of data in Google Analytics. It’s enough to select a name and time zone. When finished, click Create View. All the data that will be collected regarding the actions of visitors to your page through integrating FreshMail with Google Analytics will be displayed in this view. In the example below is the view for FreshMail_EMA_View. You should also set goals for Google Analytics in this view, for example, trigger the sending of autoresponders. Read more about how to create and edit new goals in dedicated guide from Google Analytics. The set view name can be found later in the dropdown list in the final stage of integration with FreshMail.
FreshMail Email Marketing Automation: Integration with Google Analytics 8
Step 4 The next stage of the configuration is to prepare a Google developer account. Go to Google Developers Console and follow the steps below. You may be asked to log in to your Google Account that you used to configure Google Analytics so that you can be recognized as a user. At Select a project, choose Create a project as in the screen below.
FreshMail Email Marketing Automation: Integration with Google Analytics 9
Then give the project a name, choose location and click Create.
Creating the project may take a few moments. In the upper right hand corner of the screen you will see information regarding its progress.
FreshMail Email Marketing Automation: Integration with Google Analytics 10
When the new project is created, select Credentials from menu on the left. Next click Create credentials and select OAuth Client ID.
Click Configure consent screen in the new window.
In the next step, enter the name of the project in Product Name. This is where you must configure the window of authorization for Google Services that will be appear in Step 6. The name that you will enter in the Product Name field FreshMail Integration, in this example will also be displayed in the authorization window for Google services.
FreshMail Email Marketing Automation: Integration with Google Analytics 11
After entering the name, click Save. In the next window, select Web application. In the name field, enter a name or use the default Web client 1. In the Authorized JavaScript origins field, enter:
https://app.freshmail.com
and in the Authorized redirect URL’s field, enter first:
https://app.freshmail.com/pl/marketingautomation/googlecallback
and then, in the next field:
https://app.freshmail.com/en/marketingautomation/googlecallback
When finished, click Create in accordance with the graphic below.
FreshMail Email Marketing Automation: Integration with Google Analytics 12
You will then see a window that contains very important information.
These are your Client ID and Client secret. Copy and save them in a safe and convenient place as you will need them in Step 6 of the integration with FreshMail.
FreshMail Email Marketing Automation: Integration with Google Analytics 13
After saving the information, click OK.
Step 5 In Other popular APIs search the position of the Analytics API.
In the next window, select the blue Enable button.
FreshMail Email Marketing Automation: Integration with Google Analytics 14
Step 6 Log in to your FreshMail account. Go to Settings on the right hand side and select Plugins and API and then Integration. When you arrange your first integration in FreshMail, in the Suggested plugins select Marketing Automation and click the Connect button.
A new window will appear in which you will enter your Client ID and Client Secret. This is the information that you received from Google Console in Step 4.
FreshMail Email Marketing Automation: Integration with Google Analytics 15
You will then be redirected to the Google Authorization page. During this process you may be asked to select from multiple Google Accounts so be sure to select the one you were working in earlier.
At this point the name that you entered in Step 4 of the integration will be displayed. The
value you entered for the Product Name, in this case FreshMail Integration, is also
displayed in the window authorizing you to use Google’s services.
In the window below, click Allow.
After getting authorization, you will automatically return to the FreshMail application, where
you will be able to add the name of the new integration. The name will also appear when, for
example, you set up an autoresponder in the Integration with GA field.
In the GA profile field, select the Google Analytics view that you set earlier in this case,
FreshMail_EMA_View. In the Size field, select the name of the new custom dimension that
you created in this case, FreshMail_EMA_Dimension.
Select the list of recipients whose behavior you want to track and click Launch integration.
FreshMail Email Marketing Automation: Integration with Google Analytics 16
When you later see your newly created inegration on the list of other integrations, you can close the window with green cross at the top right of the screen.
Step 7
Everything is now set up. You only have to place a piece of JavaScript code on your web page. It’s best to avoid copying and pasting code from a PDF document so we are making it available from Pastebin. Read about how to get it below. At the end of the <head> section, place code 1, which you can copy from one of the two fields in Pastebin at the following link: Code 1 At this stage of the integration you can connect FreshMail with Google Analytics or, if you prefer, use Google Tag Manager. If you want to proceed to integration with Google Analytics, go to Option B. Keep reading below to learn more about integrating with Google Tag Manager.
Option A If you don’t have an account in Google Tag Manager, you can open one for free here. Set your account name and click Continue.
FreshMail Email Marketing Automation: Integration with Google Analytics 17
Then name your folder (container) where you want to store your data, select the Web option,
followed by Create in order to complete the creation of your account. After accepting the
terms and conditions of the application your account will be ready to use.
To integrate Google Tag Manger with your site, you must first place the source code on your site. After opening your account, just click on the code in the red box.
FreshMail Email Marketing Automation: Integration with Google Analytics 18
Paste the code just before the end of the </body> tag in your source code.
The actual integration of FreshMail with Google Tag Manager starts with creating a new variable. To do this, select Container and then Variables from the side menu. Scroll to the bottom and click the red New button.
FreshMail Email Marketing Automation: Integration with Google Analytics 19
Then choose the type of JavaScript Variable and enter FMUserld as the name of the global variable and click Create Variable.
You will be asked to assign a name to your newly created variable, after which you need to click Save. Next, select Tags from the left hand menu. You can learn more about creating new tags in Google Tag Manager in this dedicated guide. If you already have tags that you use on your site, modify them by adding the parameters below. To change parameters, choose a tag from the list. In the first step of the process you have to complete the Configure Tag. In Tracking ID add the number of your Google Analytcs account, as below.
FreshMail Email Marketing Automation: Integration with Google Analytics 20
(You can find this number on the home page of your Google Analytics account, as in the screen below)
Next, expand the More settings and Fields to Set option. Click Add field and enter userld as the Field Name. You can use the plus icon to expand all the options. Enter {{FMUserId}} (the name of the variable you created earlier) as the Value. You can also use the plus icon here.
FreshMail Email Marketing Automation: Integration with Google Analytics 21
When you complete the field, expand the Custom Dimensions option and click Add Custom Dimension. Enter the dimension number that you created in Step 3 as the Index. Enter {{FMUserId}} as your Dimension Value.
Next, select the Continue and Save Tag option.
Remember that to fully integrate FreshMail with Google Tag Manager, you should modify all of your tags to comply with these rules.
FreshMail Email Marketing Automation: Integration with Google Analytics 22
After saving your settings, remember to publish the results.
When you have saved everything, click the Publish button in the right hand corner of the screen to introduce the tags on your site. Now all data will be sent to Google Analytics. You can continue to follow instructions from Activation Campaign.
Option B
Replace the line of code from your earlier integration with Google Analytics as see below
with Code 2, which is also available in Pastebin at the following link:
Code 2
Attention! If you have never pasted Google Analytics code on your web page before, copy
Code 3 at the Pastebin link below (from either field) and add it to the end of the page code
just before the end of </body>. After this is completed, continue with the next step.
Code 3
Then substitute the phrase dimensionINDEXfor dimension1 pasted between the ''marks or instead of 1 add a different number from the index column that was displayed in the table when creating a new custom dimension in Google Analytics at the end of Step 2. Also, both phrases UAxxxxxxxxx must be replaced by your unique Tracking ID that you got in Step 1. Remember to put it between '' marks.
FreshMail Email Marketing Automation: Integration with Google Analytics 23
Activation Campaign You’re done with integrating FreshMail with Google Analytics! Remember that in order to take advantage of all the possibilities of Email Marketing Automation with FreshMail, you need to take one more step. You need to send a campaign to your subscribers with a link to the page that you want to follow their activity. You will be able to track only the users who click on this link. If you want to use additional UTM parameters in the link that let you set the source of the campaign or its name, fill in the data in the fifth step of the Campaign Creator (Advanced). Mark the Enable advanced and Google Analytics integration and then click Edit.
Then add your parameters to be forwarded to Google Analytics. Choose whether you want all links to be followed or only those that you mark.
FreshMail Email Marketing Automation: Integration with Google Analytics 24
IMPORTANT: If you hardcode the parameters into the link instead of adding them in the campaign creation process, integration with Marketing Automation will not work! Once you have completed this you will be able to send autoresponders to your subscribers who achieved certaint goals you set in Google Analytics, as in the example below.
FreshMail Email Marketing Automation: Integration with Google Analytics 25
Now in the Integration with GA field, select the name of the integration that you set up Email Marketing Automation in this example and set all the parameters of the new autoresponder.
FreshMail Email Marketing Automation: Integration with Google Analytics 26
Done! :)
FreshMail Email Marketing Automation: Integration with Google Analytics 27