Have ideas to improve npm?Join in the discussion! »

    @shopify/react-tracking-pixel
    TypeScript icon, indicating that this package has built-in type declarations

    3.1.10 • Public • Published

    @shopify/react-tracking-pixel

    Build Status Build Status License: MIT npm version npm bundle size (minified + gzip)

    Allows React apps to easily embed tracking pixel iframes.

    Installation

    $ yarn add @shopify/react-tracking-pixel

    Usage

    This library exports a <TrackingPixel /> component, which allows React apps to easily embed tracking pixel iframes.

    Basic Example

    import TrackingPixel from 'react-tracking-pixel';
    
    // ...
    
    const myurl = 'myurl';
    
    <TrackingPixel url={myurl} />;

    With Proconnected Hosts

    import TrackingPixel from 'react-tracking-pixel';
    
    // ...
    
    const myurl = 'myurl';
    const myhosts = ['example.com', 'moreexamples.com'];
    
    <TrackingPixel url={myurl} preconnectHosts={myhosts} />;

    Interface

    export interface Props {
      url: string;
    
      /**
       * Additional hosts to preconnect to. These should be hosts that
       * are connected to by the page that will be loaded in an iframe.
       */
      preconnectHosts?: string[];
    }

    Keywords

    none

    Install

    npm i @shopify/react-tracking-pixel

    DownloadsWeekly Downloads

    202

    Version

    3.1.10

    License

    MIT

    Unpacked Size

    12.1 kB

    Total Files

    21

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar