### Install exoclick-react with npm Source: https://github.com/tomhooijenga/exoclick-react/blob/master/docs/get-started.mdx Install the exoclick-react library using npm. ```bash npm install exoclick-react ``` -------------------------------- ### Install exoclick-react with yarn Source: https://github.com/tomhooijenga/exoclick-react/blob/master/docs/get-started.mdx Install the exoclick-react library using yarn. ```bash yarn add exoclick-react ``` -------------------------------- ### Install exoclick-react SDK Source: https://github.com/tomhooijenga/exoclick-react/blob/master/README.md Use npm or yarn to install the exoclick-react package. ```bash npm install exoclick-react # or yarn add exoclick-react ``` -------------------------------- ### Web Fullpage Interstitial Example Source: https://github.com/tomhooijenga/exoclick-react/blob/master/src/components/FullpageInterstitial/FullpageInterstitial.mdx Use this for standard web implementations. It opens on internal links and can be closed by the viewer. This variant is restricted from opening on screens with a height greater than their width (e.g., most mobile phones). ```javascript import { Playground, Props } from 'docz'; import { FullpageInterstitial } from './FullpageInterstitial'; e.preventDefault()} className="demo-desktop">Click me ``` -------------------------------- ### Mobile Fullpage Interstitial Example Source: https://github.com/tomhooijenga/exoclick-react/blob/master/src/components/FullpageInterstitial/FullpageInterstitial.mdx This variant is designed for mobile devices. It opens on internal links and can be closed by the viewer. Unlike the desktop version, it has no restrictions on screen aspect ratio. ```javascript import { Playground, Props } from 'docz'; import { FullpageInterstitial } from './FullpageInterstitial'; e.preventDefault()} className="demo-mobile">Click me ``` -------------------------------- ### Import and Use Banner and Outstream Components Source: https://github.com/tomhooijenga/exoclick-react/blob/master/README.md Import Banner and Outstream components from the 'exoclick-react' library. Use the Banner component for various banner types and the Outstream component for video ads. Ensure you provide the correct zoneId for each component. ```jsx import { Banner, Outstream } from "exoclick-react"; // Banner, Mobile Banner and Multi-Format // Outstream Video ``` -------------------------------- ### Sticky Banner Basic Usage Source: https://github.com/tomhooijenga/exoclick-react/blob/master/src/components/StickyBanner/StickyBanner.mdx Demonstrates the basic implementation of the Sticky Banner component with essential props. ```APIDOC ## Sticky Banner Basic Usage ### Description This example shows how to use the Sticky Banner component with a zone ID, horizontal and vertical positioning, and a specific format. ### Method N/A (Component Usage) ### Endpoint N/A (Component Usage) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```jsx ``` ### Response #### Success Response (200) N/A (Component Rendering) #### Response Example N/A (Component Rendering) ``` -------------------------------- ### Placeholder for Outstream Video Ads Source: https://github.com/tomhooijenga/exoclick-react/blob/master/src/components/Placeholder/Placeholder.mdx Integrate the Placeholder component with ExoClick outstream videos to avoid content shifting as the video player loads. The specified dimensions should accommodate the video player. ```jsx import { Playground, Props } from 'docz'; import { Banner, Outstream, Placeholder } from "../../index"; ``` -------------------------------- ### Render Recommendation Widget Source: https://github.com/tomhooijenga/exoclick-react/blob/master/src/components/RecommendationWidget/RecommendationWidget.mdx Use the RecommendationWidget component to display native ads. Requires a zoneId prop. ```javascript import { Playground, Props } from 'docz'; import { RecommendationWidget } from "../../index"; # Recommendation Widget The native advertising offers a fully customizable widget that features images and a short text, title and description. The native ads are completely responsive across all devices: desktop, mobile and tablet. ## Props ``` -------------------------------- ### Implement Placeholder components Source: https://context7.com/tomhooijenga/exoclick-react/llms.txt Wraps ad components to reserve space and prevent Cumulative Layout Shift (CLS) during ad loading. ```jsx import { Banner, Outstream, Placeholder } from "exoclick-react"; // Placeholder for banner - prevents layout shift function BannerWithPlaceholder() { return ( ); } // Placeholder for outstream video function OutstreamWithPlaceholder() { return ( ); } // Multiple ad units with placeholders function AdLayout() { return (
); } ``` -------------------------------- ### Basic Adblock Usage Source: https://github.com/tomhooijenga/exoclick-react/blob/master/src/components/Adblock/Adblock.mdx Uses a render prop function to display different content based on the blocked state. ```jsx {({ blocked }) => {blocked ? 'Blocked!' : 'Not blocked'}} ``` -------------------------------- ### Adblock Component Usage Source: https://github.com/tomhooijenga/exoclick-react/blob/master/src/components/Adblock/Adblock.mdx Demonstrates the basic usage of the Adblock component. It accepts a function as a child, which receives an object with a 'blocked' boolean property. ```APIDOC ## Adblock Component A component to tell if the user has adblock enabled or not. ### Description This component allows you to check if the user has an adblocker enabled and conditionally render content based on the result. ### Usage Adblock accepts only one child, which must be a function. This function receives an object containing a `blocked` boolean property. Use this property to determine what to display. ### Request Example ```jsx {({ blocked }) => {blocked ? 'Blocked!' : 'Not blocked'}} ``` ### Response The child function receives an object with the following property: #### Success Response - **blocked** (boolean) - Indicates whether an adblocker is detected. ``` -------------------------------- ### Render RecommendationWidget components Source: https://context7.com/tomhooijenga/exoclick-react/llms.txt Use for native advertising widgets. Supports basic rendering and advanced traffic segmentation via sub-IDs and keywords. ```jsx import { RecommendationWidget } from "exoclick-react"; // Basic recommendation widget function BasicRecommendations() { return ; } // Recommendation widget with traffic segmentation function TargetedRecommendations() { return ( ); } ``` -------------------------------- ### Configured Outstream Video Source: https://context7.com/tomhooijenga/exoclick-react/llms.txt Customize outstream video ads with options like maxWidth, frequency capping, branding, and traffic segmentation. Ensure the zoneId is correctly set. ```jsx import { Outstream } from "exoclick-react"; // Outstream with all options configured function ConfiguredOutstream() { return (