Retargeting campaigns allow advertisers to serve ads to users who have previously engaged with their app. In Swaarm, retargeting works by uploading a list of device identifiers (IDFA for iOS, GAID for Android) and configuring a click rule that only allows traffic from users on that list.
How to set up retargeting
Step 1 - Enable the Invalid User Identifier optimization rule
First, configure a click optimization rule so that only users on the retargeting list can pass through. Without this rule, the retargeting list has no effect.
Go to Automation → Optimizations
Create a rule for Click: Invalid User Identifier
Scope it to the specific offer — do not set this rule globally
⚠️ Do not set this rule globally - it will block all traffic on any offer that does not have a retargeting list configured. Instead select specific offer/advertiser this rule should be applied to.
Step 2 - Upload the retargeting audience
Go to Offer → Retargeting tab
Select the Hash Method:
None - upload IDs in plain text
SHA256 - upload IDs pre-encoded with SHA256
Upload a CSV file containing the IDFA/GAID values in a single column
Click Save
ℹ️ The device ID passed in the publisher tracking link does not need to be encoded - only the values in the CSV file need to match the selected hash method.
ℹ️ Ensure that all values in the CSV files are either encoded or non-encoded based on the selected encoding option
Which identifier is checked per platform:
Platform | Identifier checked |
iOS | IDFA |
Android | GAID |
Web | Both IDFA and GAID |
ℹ️ You can upload multiple CSV files to target different sets of users.
FAQ
1) What if the Invalid User Identifier rule is not activated?
The retargeting list has no effect - all traffic passes through regardless of whether the user is on the list.
2) Do IDs in the tracking link need to be SHA256 encoded if SHA256 is selected? No - the encoding option only applies to the values in the uploaded CSV file. IDs passed in the tracking link should remain in plain text.
3) How can I set an integration with Appsflyer Audience?
See the details here.


