Targecy Docs
  • Getting Started
    • 👋Welcome to Targecy!
    • đŸ”ŦWhy Targecy
    • ❔FAQs
    • 🔗Quick Links
  • 🎨Advertisers
    • âœī¸Set Up
    • đŸ’ģManage campaigns
    • 📈Performance Analysis
    • â›ŗSDK Integration
  • đŸ“ŦPublishers
    • âœī¸Sign Up as Publisher
    • đŸ“ēHow to show an Ad
    • đŸ–Œī¸Customizable SDK
    • đŸ–ŧī¸Layouts
    • đŸ•šī¸Demo Publisher
  • đŸĨˇEnthusiasts
    • 🔒Privacy First User experience
  • 🆘Help
    • â˜Žī¸Contact Us
  • âš–ī¸Legal
    • 📜Terms & Conditions
Powered by GitBook
On this page
  • Add our SDK to the project dependencies
  • Insert Ad
  • Required Parameters
  • Optional Parameters

Was this helpful?

  1. Publishers

How to show an Ad

PreviousSign Up as PublisherNextCustomizable SDK

Last updated 1 year ago

Was this helpful?

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 .

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';
  }

đŸ“Ŧ
đŸ“ē
npm