Skip to main content

Swaarm - Swaarm: Advanced Privacy Integration

How to set up PEA Chain attribution when integrating with a partner who also uses Swaarm.

Overview

This guide applies when you're integrating with a partner who also operates on Swaarm - whether you're on the advertiser side (running the offer) or the publisher side (sending traffic).

Since a click ID can't always be reliably passed under iOS 14.5+, the PEA Chain token is used instead to ensure attribution still works correctly between the two Swaarm instances.

The token flows through the full chain like this:

  1. Publisher generates the PEA Chain token and passes it in the tracking link sent to the advertiser

  2. Advertiser receives the click, and when a conversion happens, returns the same token in the postback sent back to the publisher

  3. Publisher reads the token from the postback to correctly attribute the conversion to the original click

ℹ️ For more on how PEA Chain works → Privacy Enabled Attribution


If You're the Publisher

1. Generate the token in your tracking link

Make sure the tracking link you received from the advertiser includes the following parameter: &pea_chain={pea.chain}

Full tracking link example:

https://yournetwork.trckswrm.com/click?offer_id=1234&pub_id=12&pea_chain={pea.chain}

This generates the PEA Chain token at the moment of the click.

2. Read the token from the incoming postback

The postback you receive from the advertiser will include a pea_chain parameter. Make sure your Swaarm setup reads this value to correctly attribute the conversion back to the original click.


If You're the Advertiser

1. Return the token in your postback

When a conversion happens, your postback to the publisher must include:

&pea_chain=#{peaChain}

Full postback example:

https://track.yournetwork.swaarm-clients.com/postback?click_id=#{click.publisher.clickId}&sale_amount=#{payout.theyGetInDollars}&event_id=#{offer.eventTypeId}&pea_chain=#{peaChain}&status=#{status.state}

ℹ️ The pea_chain value you return must match the value the publisher originally sent in the tracking link.

Did this answer your question?