This article will help you:
  • Integrate nugg.ad with Optimizely

nugg.ad is an Audience Data Provider and Platform for information on socio-demographics, product interests/affinities and consumer behaviour. This data allows you to define Optimizely Custom Dimensions, which in turn allow you to analyze your results and target your experiments by otherwise unavailable attributes. This article explains how to get started.

Prerequisites

This integration requires a nugg.ad subscription and an Optimizely Enterprise account. You will use Optimizely's JavaScript API to assign a visitor to a custom dimension when it is a member of a nugg.ad audience. 

 
Note:

The dimensions of the nugg.ad audience can vary according to your specific nugg.ad subscription.

You will also need the following:

  1. a nugg.ad Javascript tag with your network ID and site ID in the form:   <script type='text/javascript' src="//__SUBDOMAIN__.nuggad.net/rc?nuggn=__NETWORK_ID__&nuggsid=__SITE_ID__"> </script> this will be provided to you by nugg.ad
  2. the nugg.ad output mapping list enables you to translate the key value logic into human readable audience dimensions. This list has a simple format like:

Deploy integration snippet

In the following block of example code, the nugg.ad tag will be provided to you by nugg.ad with your specific nugg.ad IDs. You should also insert the Optimizely snippet, which you can find under the Settings tab in your Optimizely Home page.

Insert this code at the bottom of your head tag to load the Optimizely snippet. A standard implementation would deploy this site wide:


 <!-- -->
<script type='text/javascript' src="//__SUBDOMAIN__.nuggad.net/rc?nuggn=__NETWORK_ID__&nuggsid=__SITE_ID__">
</script>

< type='text/javascript'> 
  window['optimizely'] = window['optimizely'] || [];
	window['optimizely'].push(["customTag", {
  //namings like ”gender” can be free defined  
  gender: nuggAIArray.d1,
  age: nuggAIArray.d2,
  Size_of_household: nuggAIArray.d3,
  Kids_in_household: nuggAIArray.d4,
  Main_income_earner: nuggAIArray.d7,
  responsability_for_household: nuggAIArray.d8,
  Level_of_education:  nuggAIArray.d9,
  Employment_status: nuggAIArray.d10,
  Personal_income: nuggAIArray.d11,
  Household_income: nuggAIArray.d12
  // … and so on
}]);
  </script>

<!-- your Optimizely Snippet -->
<script src="//cdn.optimizely.com/js/__YOUR_Project ID__.js"></script>
<!-- -->
</head>
 
 
Note:

The naming of audience dimensions e.g. “gender”, “age” is up to you. Usually you would probably make it more encrypted, maybe even just using the nugg.ad keys like “d1”, “d2” etc. The mapping can also take place when assigning an Optimizely Audience.

Also the number of dimensions can vary according to your nugg.ad subscription, e.g. there could be dimensions like “car interest” etc.

Visitors will now be included in Custom Tags which can be used to create new audiences in Optimizely and track in the results page.

Use custom tag in experiment

When you have a list of fields and values nugg.ad can deliver, you can target those values with custom tags in Optimizely. You can read more about how to use custom tags in the article Audience conditions: Descriptions and examples. The custom tag “tag” should match the field that nugg.ad returns (like “age”). The “value” should match the value that nugg.ad returns.