Advanced visitor segmentation

Sometimes you have specific information about your visitors. That can be used for ad targeting if you can pass this data on to the MaxTraffic platform. 

With a tiny JavaScript snippet, you can give us the information about your visitor status, history or activities on the page.

Some potential segments that could be used for targeting:
- Visitor has products in his shopping cart
- Cart total amount is below 50€ (maybe you have a free shipping for larger orders)
- Visitor has logged in
- Visitor is a female / male
- Visitor has not signed up for your newsletter

You can define segments with this small piece of JavaScript code that should be placed right before loading the MaxTraffic tracking script.

You can define one segment:

<script>
mt('segments', ['has products in cart']);
</script>

Or also several segments at once, if needed:

<script>
mt('segments', ['has products in cart', 'cart total below 50€', 'female']);
</script>

All the segmentation code together with the tracking code should look like this (note that in 1234 you should use your own website ID):

<script>
window.mt=window.mt||function(){(mt.q=mt.q||[]).push(arguments)};mt.l=+new Date;
//define segments
mt('segments', ['has products in cart', 'cart total below 50€', 'female']);
//load tracking script
mt('create', 1234);
</script>
<script async src='//cdn.mxapis.com/mt.js'></script>


As a result of giving this information to our platform, you will see new additional targeting options on the second step of campaign creation process.

2-5-1. Advanced visitor segments