Guide PropellerAds: "Audiences" with S2S management

Edu-Money

Alukard_X

Super Contributor
Joined
Oct 3, 2020
Messages
150
Propellerads: "Audiences" with S2S management
You can collect ID's from different "sources" and use such Id's for retargeting in PropellerAds.

1. You need to grab userid and store it
JavaScript:
                                 fetch('https://my.rtmark.net/gid.js', {credentials: "include"})
                                 .then((response) => {
                                   return response.json();
                                 })
                                .then((data)  => {
                                   var link = window.location.href.split('?')[0] +  '?sub_id=' + subid + '&_update_tokens=1&sub_id_10=' +  data.gid;
                                   addPixel(link);

                                });
2. To add or exclude such user
you can add additional postback in campaign to php script that will add it to specific audience
PHP:
<?php

$rtg_id = $_GET['rtg_id'];
$gid  = $_GET['gid'];
if (!empty($rtg_id) && !empty($gid)) {

$headers  = array();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://my.rtmark.net/img.gif?f=sync&lr=1&partner='  . $rtg_id);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip,  deflate');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_COOKIE,  'ID=' . $gid);
$response = curl_exec($ch);
curl_close($ch);

}

f=sync -add
f=off -exclude

s2s_audience-png.47036
 
Last edited:
To view the premium content in our affiliate marketing forum (including this awesome thread), you must first register and upgrade your account. Register today and become a part of our amazing community!
Top