6.0.3 • Published 9 months ago

capacitor-facebook-events v6.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

capacitor-facebook-events

Facebook events tracking in Capacitor applications

Install

npm i --save capacitor-facebook-events
npx cap sync

API

setAdvertiserTrackingEnabled(...)

setAdvertiserTrackingEnabled(options: { enabled: boolean; }) => Promise<void>
ParamType
options{ enabled: boolean; }

logEvent(...)

logEvent(options: { event: string; params?: any; }) => Promise<void>
ParamType
options{ event: string; params?: any; }

Example Usage

Logging a Registration Event

To log a registration event, use the 'fb_mobile_complete_registration' event name:

import { FacebookEvents } from 'capacitor-facebook-events';

// ...

FacebookEvents.logEvent({
event: 'fb_mobile_complete_registration',
params: {
// Additional parameters (optional)
}
});

Logging a Purchase Event

For logging a purchase event, use the 'fb_mobile_purchase' event name with relevant parameters:

import { FacebookEvents } from 'capacitor-facebook-events';

// ...

FacebookEvents.logEvent({
    event: 'fb_mobile_purchase',
    params: {
        fb_content_id: 'item_id', // Item ID
        fb_content_type: 'product',
        fb_currency: 'currency_code',
        _valueToSum: amount // Purchase amount
    }
});

For a comprehensive list of events, refer to the Facebook App Events API documentation.

6.0.3

9 months ago

6.0.1

1 year ago

6.0.0

1 year ago

6.0.2

1 year ago

5.0.1

1 year ago

5.0.0

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago