Resource Center

Pixel Signature Generation Code Examples

Integration Example

Private Key: 22a8fb83fb0d863fcf4c37033bd5ea24ee55aec9
Order Id: 54563131



Parameter Integrated in Pixel

<iframe src=" &PROGRAM_ID=000&ORDER_ID=54563131&SIGNATURE=f21b23c92f4e4a4c5f92108b2de179d611dd5fa4801163bfdbbd8f7624bd8d63<...>" width="1" height="1" frameBorder="0"></iframe>

HMAC Hashing

Algorithm  SHA256


Please see the code examples below for an example on how to implement HMAC hashing.


Javascript Code Example

const crypto = require("crypto"); 
const secret = "advertiser-secret";
const orderId = "order-id123";
const algorithm = "sha256";
const hash = crypto.createHmac(algorithm,secret); hash.update(orderId);
const signature = hash.digest('hex');


PHP Code Example


// PHP Example
// Documenation

$secret = 'advertiser-secret';
$orderId = 'order-id123';
$algorithm = 'sha256';
$signature = hash_hmac($algorithm, $orderId, $secret);


Ruby Code Example

# !/usr/bin/env ruby 

# Documenation

secret = "advertiser-secret"
order_id = "order-id123"
algorithm = "SHA256"
signature = OpenSSL::HMAC.hexdigest(algorithm, secret, order_id)

Python Code Example

# Python HMAC Example 

# Documentation

import hmac
import hashlib
secret = "advertiser-secret"
order_id = "order-id123"
algorithm = hashlib.sha256

# .encode converts the strings to bytes
signature =, order_id.encode(), algorithm).hexdigest()