Free Behavioral Targeting and Segmentation - BTBuckets

Javascript API

All these functions are available within the BTBuckets tag to help you manage buckets information, profile your users and integrate with other systems.

METHOD
$BTB.isUserOnBucket
Find out if the user is in a specific bucket
$BTB.getAllUserBuckets
Get all buckets the user is in
$BTB.execCallback
Run a selected target code
$BTB.trackEvent
Track user events or flash sites to profile them
$BTB.isUserOnBucket

Syntax

$BTB.isUserOnBucket(friendly_name);

Parameters

friendly_name
A string of the desired Bucket to test, the same when you created the bucket.

Return

Returns true if the passed friendly name corresponds to the bucket the user is in
$BTB.getAllUserBuckets

Syntax

$BTB.getAllUserBuckets();

Parameters

None

Return

Returns an array with all friendly names of the buckets the user is in.
$BTB.execCallback

Syntax

$BTB.execCallback(target_name);

Parameters

target_name
A string of the desired target code to run

Return

Nothing (Runs the configured code by you, so the return is the result of your code)
$BTB.trackEvent

Syntax

$BTB.trackEvent(event_name);

Parameters

event_name
A string with the event name that you want to track when user acts. The name of the event you set using the profile configuration tool for your buckets, for example $BTB.trackEvent("clicked_on_menu");

Return

Returns an updated list of the user buckets that you can get using $BTB.getAllUserBuckets or $BTB.isUserOnBucket functions.

Follow us on Twitter

© 2010   Created by BTBuckets.

Badges  |  Report an Issue  |  Terms of Service