Introduction

Harvest Collect has several important functions and one of it is to let you use tools like the Harvest Store, Google Analytics or Facebook.

What is a tool?

A tool is an application you want to send data to or want to use on your website. Examples are:

Tools that require data

  • Google Analytics
  • Facebook
  • Google Ads

Tools that you want to use on your website

  • AB-testing and personalization (Optimizely, Visual Website Optimizer, etc.)
  • Live chat
  • Chatbots
  • Pop-ups

To make use of these tools, you will need a tool configuration. A tool configuration is basically all required information to be able to send data to or make use of a tool.

If you want to send data to Google Analytics, you will need a UA-code, if you want to send data to Facebook, you will need a pixel ID.

In Harvest we have a selection of tool templates which you can use to create your tools. It is also possible to use the same tool multiple times as can be seen in the examples below.

For more information about tool templates, read the tool templates documentation.

Each event that is processed, will look at the configured tools. In each tool you can (conditionally) tell Harvest what the tool configuration should be for the event.

You can configure the following for a tool:

Let’s start with an example.

Let’s say you have two domains: www.exampleA.com and www.exampleB.com. You want to use the following tools:

  1. Google Analytics
  2. Google Ads Remarketing
  3. Google Ads Conversion

Each domain has a checkout process. You have configured the following funnelsteps:

  1. Checkout - Cart
  2. Checkout - Shipping information
  3. Checkout - Payment information
  4. Checkout - Success

We have also configured the following domains:

  1. https://wwww.exampleA.com
  2. https://www.exampleB.com

You want to track user interactions on both websites. To track user interaction in Google Analytics, you will need 2 things:

  1. A datalayer*
  2. A tool configuration for each tool

*To implement the datalayer, you will use our tracking code. For more information, read our tracking code documentation.

What is a tool configuration?

Any tool requires a form of configuration. If you want to use Facebook, you will have to set the ID of the pixel. If you want to use Google Analytics, you will need a UA-code.

These configuration are usually dependent on the type of interaction or the place where the interaction occurs. An example is that you will use a different UA-code for Google Analytics for each domain you have.

What is the difference between a tool configuration and global settings?

Besides tool configuration, which can be dependent on something, we also have global settings. These settings are always the same for the tool, regardless the interaction or the place where the interaction occured.

You could argue that sometimes the pixel ID of Facebook will also always be the same. That is true, but it can be dependent. This is different from global settings, because they always are the same.

An example could be that you turn on Enhanced Ecommerce functionality for Google Analytics.

Default tool configuration

In the scenarios mentioned earlier, we did not have very complex and long conditional tool configurations. It is however possible that you will have more than 100 domains. You could use the Harvest Store, which requires two variables:

  • Host (the host of your Harvest store)
  • Index (the index to which the data should be sent)

Usually for all domains the Host will be the same, but the index will change per domain or group of domains. We could then use the following configuration:

Name: Harvest Store
Default configuration:
    Data - {
        "host": "https://store.harvest.graindata.com"
    }
Configuration:
    Domain
        If domain https://wwww.exampleA.com
            Data - {
                "index": "website-a"
            }
        If domain https://wwww.exampleB.com
            Data - {
                "index": "website-b"
            }

As you can see, we only set the index in the conditional configuration and set the host in the default configuration. This saves you a lot of configuration.

Tool configuration mapping

Google Analytics

Google Analytics per domain

For Google Analytics, the basic tool configuration contains the UA-code. Since we have 2 domains with each a different UA-code, we could implement this as follows.

Name: Google Analytics Per Domain
Configuration:
    Domain
        If domain https://wwww.exampleA.com
            Data - {
                "uaCode": "UA-12345-6"
            }
        If domain https://wwww.exampleB.com
            Data - {
                "uaCode": "UA-65432-1"
            }

Whenever we process an event on exampleA.com, Harvest will check the tool configurations. It will find 1 tool configuration named Google Analytics Per Domain. It will check whether there is a conditional configuration. It sees we have defined a conditional configuration based on Domain. We have triggered the event on exampleA.com, this means that Harvest will choose the configuration UA-12345-6 for this event. This means the data will be sent to Google Analytics to property UA-12345-6.

For exampleA.com the toolData will look like this:

{
    "Google Analytics Per Domain": {
        "uaCode": "UA-12345-6"
    }
}

Google Analytics Roll-up

Besides tracking seperately for each domain, it might also be really handy to have 1 so called roll-up account for Google Analytics. If we add this to our tool configurations, we will have the following:

Name: Google Analytics Per Domain
Configuration:
    Domain
        If domain https://wwww.exampleA.com
            Data - {
                "uaCode": "UA-12345-6"
            }
        If domain https://wwww.exampleB.com
            Data - {
                "uaCode": "UA-65432-1"
            }

Name: Google Analytics Roll-up
Configuration:
    Data - {
        "uaCode": "UA-941230-5"
    }

Now there are 2 configurations defined. If we track an event on exampleB.com, we have to configure 2 configurations. In this case, we will also take a look at the tool configuration named Google Analytics Roll-up, since this configuration has no condition, the configuration will always have the value UA-941230-5.

For exampleB.com the toolData will look like this:

{
    "Google Analytics Per Domain": {
        "uaCode": "UA-65432-1"
    },
    "Google Analytics Roll-up": {
        "uaCode": "UA-941230-5"
    }
}

Unmatched domain

Let’s say we have an event from exampleC.com. This domain would not match with any domain in Google Analytics Per Domain. If this happens, the tool configuration will return “Could not find a configuration match.” This means that the toolData will look like this:

{
    "Google Analytics Per Domain": {
        "notLoadedReason": "Could not find a configuration match."
    },
    "Google Analytics Roll-up": {
        "uaCode": "UA-941230-5"
    }
}

Targeting

You have already seen that when there is no match in the conditional tool configuration, Harvest returns “Could not find a configuration match.”. This is already a way to target on specific domains and block domains which you have not configured.

This can however not be satisfying. That is why it is also possible to set specific targeting options. You can set targeting options for the following entities:

  • Event type
  • Pagemarkers
  • Content interactions
  • Funnelsteps
  • Domains

We could rewrite our Google Analytics Per Domain tool as follows:

Name: Google Analytics - exampleA.com
Configuration:
    Data - {
        "uaCode": "UA-12345-6"
    }
Targeting
    Domain
        - https://wwww.exampleA.com

Name: Google Analytics - exampleB.com
Configuration:
    Data - {
        "uaCode": "UA-65432-1"
    }
Targeting
    Domain
        - https://wwww.exampleB.com

As you can see, we now have created 2 tools. For each domain one. We have set the configuration unconditional. This means that for any event the tool configuration will be set.

However, we now have set targeting with a specific domain. This means that even though we have a tool configuration match, the tool configuration match will only be set if we match with all targeting options. This means that for each type of targeting at least 1 match will be made. You can for example add multiple domains for targeting, you do need to match all domains (which is not possible).

The above example is not something you will want to use. We could however say that we want to use the Google Ads Remarketing tool, but only when the event type is a pageview.

Name: Google Ads Remarketing
Configuration:
    Domain
        If domain https://wwww.exampleA.com
            Data - {
                "id":  "123123sdfsfd123123123"
            }
        If domain https://wwww.exampleB.com
            Data - {
                "id": "91231239123sdfsdfsd91231"
            }
Targeting
    Event type
        - pageview

This way, the tool configuration will only be set on either exampleA.com or exampleB.com when the event type is a pageview.

Blocking

Sometimes it is easier to say when a tool should not be used instead of saying when it should be used. Just as with targeting, you can block on the following entities:

  • Event type
  • Pagemarkers
  • Content interactions
  • Funnelsteps
  • Domains

As an example, we could change the example of targeting on a pageview to blocking.

Name: Google Ads Remarketing
Configuration:
    Domain
        If domain https://wwww.exampleA.com
            Data - {
                "id":  "123123sdfsfd123123123"
            }
        If domain https://wwww.exampleB.com
            Data - {
                "id": "91231239123sdfsdfsd91231"
            }
Blocking
    Event type
        - contentview
        - click
        - funnelstepview
        - change
        - dataview

The above example has the same effect as the example for targeting. Whenever any entity is matched for any blocking option, the tool configuration will not be set.

Variable mapping

Often it is possible to send extra information to tools. If we look at Google Analytics, it is possible to send custom metrics and custom dimensions. If we take a look at Google Campaign Manager, it is possible to send u-values.

You can use variable mapping to map variables in Harvest or fixed values to these tool specific variables.

Global settings

Each tool needs a configuration before it works. Usually the configuration can be dependent on the domain you are on or for example is based on the funnelstep a user has triggered.

However, some variables can not be dependent on a domain. These configuration are “globally” and static. An example is whether you want to use cross domain tracking in Google Analytics or not.

Note that not all tools have global settings.

Tool functions

There are several functions a tool can perform. Not every tool can perform every action. You can find more information about the meaning of each function in the tool templates documentation.

We have the following functions:

Initialize

This means that Harvest will initialize the tool. Let’s say you want to use Optimizely and choose the function “Initialize”. This means that Harvest will load the Optimizely script.

Post processing

This means that the tool will perform an enrichment on the event that is being processed. An example is that when choosing this function with Google Analytics, it means Enhanced Ecommerce data will be enriched.

Distribution

This means that we will distribute the data to the specified tool. Let’s say you have chosen this function for Facebook, then it means we will send the events to Facebook. Note that it might be required to have the tool initialized. This initialization can then be done by Harvest (by using the Initialization function) or you can load the library yourself.