â›ŗSDK Integration

Tracking users behavior

Targecy's SDK integration is the backbone of our ad network, letting us build targeting audiences through the tracking of website traffic & events for any of our ad network participants. How does it work? Targecy utilizes privacy-preserving tech (ZK-proof) to analyze user data without revealing individual user identities. By peeping into users website behavior, we are able to build in-market and affinity audiences using these characteristics while leaving data on devices.

Real world example

Lets say Uniswap wants to build a campaign with the objective of growing liquidity in the V3 USDC/ETH pool . AAVE has installed our SDK and placed an ad unit on their site. User visits the AAVE website and checks the lending APY for USDC on various chains. Later on, while the user is checking his transactions in etherscan we show an ad that encourages liquity provition in

After the user sees the ad and executes the required transaction (provide liquidity), a smart contract triggers the following actions: advertiser campaign budget spend, cashback to publisher and advertiser, cut for Targecy.

Highly customizable SDK

Our tracking methodology allows advertisers to customize their SDK according to their need (eg: advertisers that want to do user remarketing to incentivize certain action can do so in a few clicks)

By running

$ yarn add @targecy/sdk

Or manually

package.json
"dependencies": {
    "@targecy/sdk": "VERSION",
},
...

You can find the available versions at npm.

Track any page views

In case you want to track users page views, we need to add a tag wrapping the App.

_app.tsx
import { TargecyTracker } from "@targecy/sdk";

...

<TargecyTracker>
    ... providers, app, etc. ...
</ TargecyTracker>    

Optional Parameters

  { 
     env?: 'development' | 'preview' | 'production';
  }

Track any custom events in your site

In case you want to track any custom event, like a purchase, we can just call the function trackCustomEvent. We recommend awaiting the response to check that the tracking was successful.

_app.tsx
import { trackCustomEvent } from "@targecy/sdk";

...

const succeed = await trackCustomEvent({
    id: ID_OF_THE_EVENT,
    params: OBJECT_WITH_EVENT_PARAMS
});

Required Parameters

  { 
     customEventParams: {
          id: string,   
          params: any
     }
  }

Optional Parameters

  { 
     env?: 'development' | 'preview' | 'production';
  }

Need help? Please reach us at help@targecy.xyz.

Last updated