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.

Comment

You need to be a member of Free Behavioral Targeting and Segmentation - BTBuckets to add comments!

Join Free Behavioral Targeting and Segmentation - BTBuckets

Comment by Yuriy Yarovoy on August 3, 2012 at 2:58pm

Is there a tutorial on Targeting Callback Code? I haven't the slightest clue where to begin and would love to see an example. Thank you! My goal is to segment based on keyword and redirect them to the relevant page.

Comment by Aaron Smith on July 12, 2011 at 5:28pm
Comment by BTBuckets on June 29, 2010 at 6:50pm
Hello Anderson - yes, you do have to add the trackEvent code on your website where you want to bucket users based on events.

-- BTBuckets Team
Comment by Anderson Almeida on June 23, 2010 at 1:08pm
Do i have to manually insert the trackEvent snippet, is it automatic?
Thank you

Follow us on Twitter

© 2013   Created by BTBuckets.

Badges  |  Report an Issue  |  Terms of Service