SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | isset( $_GET[‘clickid’] ) ? $click_code = $_GET[‘clickid’] : $click_code = ‘0’; | |
3 | ?> | |
4 | <script type="text/javascript"> | |
5 | (function (document, window) { | |
6 | // Declaring script and what should happen on load | |
7 | var script = document.createElement("script"); | |
8 | script.type = "text/javascript"; | |
9 | script.src = "https://api.pushnami.com/scripts/v1/pushnami-adv/Key"; | |
10 | script.onload = function() { | |
11 | Pushnami | |
12 | .update({ | |
13 | "binomid": "<REPLACE WITH YOUR VARIABLE>" | |
14 | }) | |
15 | .prompt() | |
16 | ||
17 | - | // Listen for opt-in event |
17 | + | |
18 | - | Pushnami.on(['permissions-action-subscribed-new'], function() { |
18 | + | |
19 | - | var request = new XMLHttpRequest(); |
19 | + | |
20 | - | request.onreadystatechange = function() { |
20 | + | |
21 | - | if (request.readyState == XMLHttpRequest.DONE) { |
21 | + | |
22 | - | } |
22 | + | |
23 | - | } |
23 | + | |
24 | - | request.open("GET", "https://postback.com/click.php?cnv_id=<?php echo $click_code; ?>", true); |
24 | + |