The Lowdown on Segmentation

Segmentation is a powerful tool that gives you the ability to target ads by customizable key+value pairs passed from within the ad code to the ad server. Depending on your needs, segmentation values can be hard coded into the ad tag or added programmatically. Below we'll step through a basic example.

Step 1: Set Up Your Ad Code

Segmentation requires an additional parameter be added to your Pro ad tag. The standard BSA Pro ad code looks something like this:

<div id="bsap_405" class="bsaPROrocks" data-serve="CKSI4"></div>

Segmentation requires a'data-segment-key="value"'attribute be added, where "key" and "value" are customizable. For example, say you want to be able to target a "Technology" category on your site. The ad tag would look something like this:

<div id="bsap_405" class="bsaPROrocks" data-serve="CKSI4" data-segment-category="technology"></div>

The "key" here is "category" and "technology" is "value".

Note, if you're looking for a more advanced set up or have questions please see the Q&A section below.

Step 2: Set Up Your Campaign

Now that your ad code is set up with the proper 'data-segment-key="value"' attribute you can move to Pro and start targeting ads against it. Below we'll run through a basic set up using the aforementioned 'category=technology' segment:

  1. Let's start by creating a campaign using the flyout menu. Click the + icon next to "Campaigns", select the type of campaign, and then click "Continue". For the purposes of this example we'll create a "House" campaign, but you can chose whatever makes sense for your campaign.



  2. Now we select the zone the ad will run in, add a creative, and hit save. This step is no different from what you would normally do. For the purposes of our example we chose the, "Footer Leaderboard" zone.



  3. After hitting "Save" in step 2 click "Change" next to "Special Targeting".



  4. Now click "Modify" below "Segmentation" and start typing to search for either the key or value name. In our example you could either search for "tips" or "category". It's an autocomplete, so you don't have to enter the whole word. Once found just click to select it.



  5. Click "Save" to exit the Ad Settings modal window.
  6. Finally, and if you're ready, save your campaign by clicking "Next" on the top right, then "Place Order". Our campaign is now set up to target the "category=tips" custom segment.



Q&A

Q. What if I need to target more than one segment?

A. You can have multiple ''data-segment-key="value"' ' attributes in your ad tag. For example:

<div id="bsap_405" class="bsaPROrocks" data-serve="CKSI4" data-segment-category="technology" data-segment-author="johnsmith" data-segment-tag="tutorials"></div>

Once your ad tag is set up you can then select from those different segments in Pro when setting up or editing an ad. Note, when an ad tag has multiple segments they are treated as "OR" by the ad server.

Q. Can my segment contain multiple values?

A. Yes, values just need to be separated by semi-colons. For example, say you have a 'tag' segment that can contain multiple values. The set up in the ad code may look like this:data-segment-tag="tag1;tag2;tag3". Note, the last value does not need a trailing semi-colon.

Q. Can my keys and/or values contain spaces, underscores or dashes?

A. Nope. At this time they should only contain alphanumbic strings (e.g. a-z, A-Z and 1-9).

Q. Are there any limits to the number of segments I can have?

A. Yes, right now you can have, at most, 15 segments in each ad tag. For example:

<div id="123" data-segment-A="one;two;three" data-segment-B="four;five" data-segment-C="six"></div>

In this example you've definied a total of 6 of 15 segments.

<div id="456" data-segment-A="one;two;three" data-segment-two="another"></div>

Here you have a total of 4 out of 15 segments.