Note: This is an advanced feature - we highly advise you get a developer to help implement this in your scripts.
If you want to store additional data alongside a conversion or customer, e.g. a lead’s name and email, you can do so by adding a meta
object within the Options object in the conversion or customer tracking script.
Below, you’ll find examples.
Fetching conversion metadata
<script src="//tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>
<script type="text/javascript">
(function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
(t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');
tap('create', 'YOUR ACCOUNT ID');
var metaData = {
email: "chuck@norris.com",
foo: "bar",
};
tap('conversion', 'UNIQUE CONVERSION ID', CONVERSION AMOUNT, {meta_data: metaData});
</script>
Fetching customer metadata
<script src="//tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>
<script type="text/javascript">
(function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
(t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');
tap('create', 'YOUR ACCOUNT ID');
var metaData = {
email: "chuck@norris.com",
foo: "bar",
};
tap('customer', 'UNIQUE CUSTOMER ID', {meta_data: metaData});
</script>
The following limitations apply to meta data:
- Maximum key length: 64
- Maximum value length: 255
- Maximum number of properties: 10
- Illegal characters:
" : { } ] \ ' / &
Exposing metadata to affiliates
It’s possible to expose metadata for your affiliates to see on their end. Please refer to this article for more information.