đŸ“ēHow to show an Ad

Showing Ads in your site is extremely simple! Please follow the next steps.

Add our SDK to the project dependencies

By running

$ yarn add @targecy/sdk

Or manually

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

You can find the available versions at npm.

Insert Ad

Wherever in your site you want to insert the ad, please append the following tag:

import { Ad } from "@targecy/sdk";

...

<Ad publisher="YOUR_REGISTERED_ADDRESS" />

Required Parameters

{
    // the address we registered and where you will receive the rewards.
    publisher: Address  
}

Optional Parameters

{
    styling?: {
        layout?: 'banner_large' | 'banner_medium' | 'banner_small' | 'square' | 'list_item'; // list_item is the default
        backgroundColor?: string;
        titleColor?: string;
        subtitleColor?: string;
        borderRadius?: string; // in pixels
        boxShadow?: string;
        border?: string;
    },
    env?: 'development' | 'preview' | 'production';
  }

Last updated