nfl / react-gpt

A React display ad component using Google Publisher Tag
MIT License
145 stars 84 forks source link

Support for googletag.PassbackSlot #70

Open iamdhrooov opened 6 years ago

iamdhrooov commented 6 years ago

Do you have plans to add support for passback tags for third-party ad networks?

potench commented 6 years ago

None right now, but this seems like a feature that wouldn't be difficult to add: https://support.google.com/dfp_premium/answer/2811375?hl=en

Maybe by adding the following props to Bling:

<Bling 
    passbackUrl={`// String (required) URL`}
    passbackPageUrl={`// String (optional) URL`}
    passbackTargeting={
        // Array (optional)
        [{"color": "red"}, {"sport": ["rugby", "rowing"]}]  (like existing `targeting` prop)
    }
    passbackClickUrl={`// String (optional)`}
/>

Or with an optional passback object prop

<Bling passback={{
     url: string,
     pageUrl: string,
     targeting: array
     clickUrl: string 
  }} />

Which API looks better of the above 2?

harish-aka-shivi commented 5 years ago

The second one looks better.