New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@captive/capacitor-facebook-analytics

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@captive/capacitor-facebook-analytics

this is a capacitor 4 plugin for facebook analytics

  • 5.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

capacitor-facebook-analytics

this is a capacitor 4 plugin for facebook analytics

Install

yarn install capacitor-facebook-analytics
npx cap sync

Usage

import { FacebookAnalytics, FacebookEventName } from '@captive/capacitor-facebook-analytics';

// enable advertiser tracking for IOS
FacebookAnalytics.enableAdvertiserTracking();

// log event : completed registration
FacebookAnalytics.logEvent({ event: FacebookEventName.CompletedRegistration });

API

  • initAppEvents()
  • logEvent(...)
  • enableAdvertiserTracking()
  • disableAdvertiserTracking()
  • getAdvertiserTrackingStatus()
  • Type Aliases

initAppEvents()

initAppEvents() => Promise<string>

Returns: Promise<string>


logEvent(...)

logEvent(options: { event: FacebookEventName | string; valueToSum?: number; params?: any; }) => Promise<string>

Send an event to Facebook

FacebookAnalytics.logEvent({ event: <a href="#facebookeventname">FacebookEventName</a>.CompletedRegistration })

// OR

FacebookAnalytics.logEvent({ event: 'fb_mobile_complete_registration' })
ParamType
options{ event: string; valueToSum?: number; params?: any; }

Returns: Promise<string>


enableAdvertiserTracking()

enableAdvertiserTracking() => Promise<void>

Only for IOS versions greater than 14


disableAdvertiserTracking()

disableAdvertiserTracking() => Promise<void>

getAdvertiserTrackingStatus()

getAdvertiserTrackingStatus() => Promise<boolean>

Returns: Promise<boolean>


Type Aliases

FacebookEventName

Enum of all Facebook standard events

Table of correspondence :

ActivatedApp: 'fb_mobile_activate_app', DeactivatedApp: 'fb_mobile_deactivate_app', SessionInterruptions: 'fb_mobile_app_interruptions', TimeBetweenSessions: 'fb_mobile_time_between_sessions', CompletedRegistration: 'fb_mobile_complete_registration', ViewedContent: 'fb_mobile_content_view', Searched: 'fb_mobile_search', Rated: 'fb_mobile_rate', CompletedTutorial: 'fb_mobile_tutorial_completion', PushTokenObtained: 'fb_mobile_obtain_push_token', AddedToCart: 'fb_mobile_add_to_cart', AddedToWishlist: 'fb_mobile_add_to_wishlist', InitiatedCheckout: 'fb_mobile_initiated_checkout', AddedPaymentInfo: 'fb_mobile_add_payment_info', Purchased: 'fb_mobile_purchase', AchievedLevel: 'fb_mobile_level_achieved', UnlockedAchievement: 'fb_mobile_achievement_unlocked', SpentCredits: 'fb_mobile_spent_credits',

(typeof FacebookEventName)[keyof typeof FacebookEventName]

Keywords

FAQs

Package last updated on 11 Sep 2023

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