npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@theoplayer/react-native-analytics-adscript

v1.3.0

Published

Nielsen AdScript analytics connector for @theoplayer/react-native

Readme

THEOplayer React-Native AdScript Connector

A Nielsen AdScript analytics connector for @theoplayer/react-native.

Installation

npm install @theoplayer/react-native-analytics-adscript

Prerequisites

Android

On Android, the connector requires downloading the private AdScript client library module into the app's libs/ folder. Pass the SDK location to the connector by setting the adScriptSdkDir in your app's gradle.properties file:

# Location of the AdScript SDK
adScriptSdkDir=./app/libs/

iOS & tvOS

On Apple platforms, the connector requires downloading the private AdScriptAPIClient archive.

Create a Frameworks folder in your app's ios folder, copy the Adscript SDK XCFramework in it and add this AdScriptApiClient.podspec file inside, which describes the structure and metadata of Adscript's CocoaPod:

Pod::Spec.new do |spec|
  spec.name         = "AdScriptApiClient"
  spec.version      = "1.0.8"
  spec.summary      = "The Adscript Api Client for iOS"

  spec.homepage     = 'https://github.com/THEOplayer/iOS-Connector'
  spec.license      = { :type => 'MIT', :file => 'LICENSE' }
  spec.author       = "Dolby Laboratories, Inc."
  spec.source       = { :git => 'https://github.com/THEOplayer/iOS-Connector.git', :tag => spec.version.to_s }

  spec.source_files  = "Classes", "Classes/**/*.{h,m}"
  spec.ios.vendored_frameworks = "AdScriptApiClient.xcframework"
end

To enable IDFA (Identifier for Advertisers), replace the framework reference:

spec.ios.vendored_frameworks = "AdScriptApiClient.xcframework"

with

spec.ios.vendored_frameworks = "AdScriptApiClient_withidfa.xcframework"

Finally, include the AdScript SDK as dependency in your app's Podfile:

  pod 'AdScriptApiClient', :path => 'Frameworks/'

Usage

Configuring the connector

Create the connector by providing the THEOplayer instance, an implementationId, and a metadata object.

import { useAdScript, AdScriptMetadata } from '@theoplayer/react-native-analytics-adscript';

const adscriptImplementationId = "myImplementionId";
const adscriptContentMetadata: AdScriptMetadata = {
  assetId: "abc98731568435405",
  type: "content"
};

const App = () => {
  const [adscript, initAdScript] = useAdScript(adscriptImplementationId, adscriptContentMetadata, true /*debug*/);

  const onPlayerReady = (player: THEOplayer) => {
    // Initialize AdScript connector
    initAdScript(player);
  };

  return <THEOplayerView config={playerConfig} onPlayerReady={onPlayerReady} />;
};

Passing metadata dynamically

The connector allows passing or updating the current asset's metadata at any time:

const onUpdateMetadata = () => {
  adscript.current?.updateMetadata({
    assetId: 'updatedId',
    type: "content",
    // ...
  });
}

Passing additional information

Additional information about the logged-in user from the client database:

const onUpdateUser = () => {
  adscript.current?.updateUser([
    "866d3a3c-aa87-4fe7-9066-8286641edd17",     // client-side user identifier (customerId)
    "cf895a00-a987-4501-ac00-6adb57014129",     // client-side user device identifier (Android_ID)
    "9530321a-d3d0-4bda-8704-1eb94a5940c3",     // client-side profile identifier of the logged-in user (profileId)
    "jsg75682-k276t-kw82-k8d5-8926sh6528j2",    // optional - SW device identifier for a situation where there are multiple device IDs in the client DB (typically a) HW ID - fill in i2, b) SW ID - fill in i4).
    "ef3c6dc72a26912f07f0e733d51b46c771d807bf"  // fingerprint of the user's email address
  ]);
}