Socket
Socket
Sign inDemoInstall

@revjet/react-revjet-tag

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@revjet/react-revjet-tag

React RevJet Tag


Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

React RevJet Tag

RevJet content Tag for React.

Usage Example

import React from 'react'
import { isViewableEvent, RevJetTag, TrackingEvent } from '@revjet/react-revjet-tag'

export interface AppProps {}

const tagProperties: TagProperties = {
	_tag: 'tagXXXX',
	_plc_id: '12345',
	_key: 'xxx',
	debug: 'emulate',
	_opts: {
		custom_domain: 'ads.revjet.com',
		autohide: false,
		responsive: true,
		responsive_height: 'dynamic',
		delivery_method: 'banner',
		_imp_banner_size: '640x480'
	},
	_custom_parameter: 'Custom Parameter'
}

export function App(_props: AppProps) {
	// Optional
	const onBeforeLoad = useCallback(() => {
		console.log('onBeforeLoad')
	}, [])

	// Optional
	const onLoad = useCallback(() => {
		console.log('onLoad')
	}, [])

	// Optional
	const onError = useCallback(
		(err) => {
			console.log('onError', err)
		},
		[]
	)

	// Optional
	const onTrackingEvent = useCallback((type: string, event: TrackingEvent) => {
		const properties = event.getProperties ? event.getProperties() : { type: type }
		if (isViewableEvent(event)) {
			console.log('Received viewable tracking event:', properties)
		} else {
			console.log('Received tracking event:', properties)
		}
	}, [])

	return (
		<div>
			<RevJetTag
				tagProperties={tagProperties}
				onBeforeLoad={onBeforeLoad}
				onLoad={onLoad}
				onError={onError}
				onTrackingEvent={onTrackingEvent}
			/>
		</div>
	)
}

FAQs

Package last updated on 13 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc