Remarketing Audiences in Google Analytics Using Script

Introduction

PPC experts have lacked remarketing audience creation function for a while. After Remarketing with Analytics was released from a beta testing in Managment Analytics API such an opportunity has appeared. Earlier, experts needed a huge amount of time to create a big number of audiences. The new API function has changed a lot, so today Internet marketers can upload new audiences in a bulk.

General Solution

Dmytro Tonkikh, a contextual advertising specialist in Promodo, introduces the script that gets all the input data from the Google Spreadsheet file. Then, it accesses Analytics directly and creates a remarketing audience. It is possible to make dozens and hundreds of audiences with a various number of days of collection of cookie files and different conditions.

This script is configured to create a simple audience, according to the type of the visited pages. It is based on the principle of sending requests to Analytics. There is a quota for the creation of audiences which is rather small. If you need to make a lot of audiences, you can simply do a series of projects. To start making your audiences with ease, follow the steps below.

8 Steps to Make Your Audiences Using Script

1. Activate Analytics in the extended API.
2. Activate Analytics in the developer console using the link showed in the script’s logs.
3. Prepare a Google Spreadsheet.
4. Name the first column, so you will title your future audience.

Got tired of low conversions?

Our certificated experts know how to optimise your Google AdWords campaigns so that conversions increase by 35%

By clicking this button you agree to our terms & conditions

Expert Tip: add for how long the cookie files should be stored in the name of the column.

5. Name the second column that is responsible for the address or the path of the page that will be created for the audience.
6. Determine the time of storage: enter the period over which the audience will be collected over, e.g. try 7 so that you will collect audiences over the last 7 days and further in Google Analytics.
7. Add information about the Google Analytics and Adwords account.
8. Use Account Explorer service to determine ID Analytics.

This script allows you to complete up to 500 audiences:

function main() {
   var settings = {'linkedView':"XXXXXXXX",
                  'linkedAccountId':"XXX-XXX-XXXX",
                  'accountId':'XXXXXXX',
                  'propertyID':'UA-XXXXXXX-X'};
   var spreadsheet = SpreadsheetApp.openByUrl('https://goo.gl/4ZAb7Z');
   var sheet = spreadsheet.getSheetByName('Sheet1');
   var range = sheet.getRange(1, 2, sheet.getLastRow(), 3);
   var values = range.getValues();
  Logger.log(values.length);
   for(var i = 0; i < values.length; i++) {
    var name = values[i][0];
    var categoryUrl = values[i][1];
    var duration = values[i][2];
    var newAudience = Analytics.Management.RemarketingAudience.insert(
      {
        'name': name,
        'linkedViews': [settings.linkedView],
        'linkedAdAccounts': [{
            'type': 'ADWORDS_LINKS',
            'linkedAccountId': settings.linkedAccountId,
        }],
        'audienceType': 'SIMPLE',
        'audienceDefinition': {
          'includeConditions': {
            'daysToLookBack': 7,
            'segment': 'sessions::condition::ga:[email protected]' + categoryUrl,
            'membershipDurationDays': duration,
            'isSmartList': false
          }
        }
      },
    settings.accountId,
    settings.propertyID);
    Logger.log(i + ' Аудитория ' + name + ' создана');
  };
}

As a result, we get remarketing audiences created in bulk. They can be used as templates for remarketing, search, etc.

Pro Tips

The script is simple, yet it allows to create many remarketing audiences, e.g. people who visited a particular website page, in minutes. For more complex audiences, it is necessary to build segments using conditions. For further information, refer to Query Explorer service, pay your attention to the segments.

Make remarketing audiences without a hitch!

Leave a Reply

avatar
  Subscribe  
Notify of

Recent posts

PPC Case Study: How to Increase Sales in the Online Store During the Lockdown

September 22, 2020

Many online marketers habitually classify PPC ads as a tool for boosting direct sales. However, this type of advertising can be an effective means to increase brand awareness. In this article, we share the case of a premium audio equipment retailer from the UK. Client Premium Sound is a Hi-Fi & home cinema equipment retailer Continue reading >

The Ultimate Guide on Google Shopping Campaigns

September 11, 2020

In 2019 Adwords shopping campaigns generated 29% more revenue year-over-year. Whereas paid search revenue increased by only 13% over that period. Is it possible to increase conversions from Shopping ads in 2020? – Yes! Learn the best practices from real cases explained by our PPC Specialist Vladislav Platonov. What is Google Shopping? Google Shopping is Continue reading >

Mobile app promotion: 9 effective ways to market an app

September 4, 2020

Mobile apps skyrocket the digital marketing space. Last year’s CEE eCommerce report showed that 69% of shopping sessions take place on mobile and generate 44% of revenue and 41% of transactions.  Mobile app promotion matters in 2020. In this article, we will give an overview of the most effective channels used to market an app, Continue reading >

16 Ethical Principles in Business from Promodo

August 21, 2020

It’s been 16 years since we created Promodo. If it were a human, by this age, Promodo could have applied for a driving licence, received a National Insurance number or even joined a trade union. As a Digital Marketing agency, by the age of 16 we weathered crises, acquired trust of partners all over the Continue reading >

Let's get the ball rolling

Please fill in this short form and we will be in touch with you soon

For any questions [email protected]

UK | USA | EST

+44 (0) 20 313 766 81
+44 7852 537715

Lincoln
The Terrace AT5,
Grantham Street,
LN2 1BD

+1 347 809 34 86

Las Vegas
6920 S. CIMARRON RD.,
Suite 100,
NV 89113

Tallinn
Roosikrantsi 2-K230,
Kesklinna linnaosa,
Harju maakond,
Tallinn 10119

CEE Ecommerce Report 2019

Based on the analytics data of 292 websites

enter correct name, please
enter correct e-mail, please

Remarketing Audiences in Google Analytics Using Script

0
start now

Start now