class Bluekai::UserData

Public Instance Methods

user_data(site_id, query) click to toggle source

Public: method to add attributes to a user’s online profile, and to return the categories for which they qualified in one or more campaigns.

siteid:integer - Enter the site ID associated with the

BlueKai Container you deployed on your site. If you are sending data
to BlueKai, the specified site ID must be included in the
classification rules used to map your phints (user attributes)
to categories in your taxonomy. If you are getting data, the
specified site ID must be in the pixel URL of the campaign
targeting the user.

userid:string - Enter the encrypted BlueKai UUID (BKUUID) for the user. The BKUUID may

be returned by the ID swap tag you deployed on your site.

puserid:string - Enter your Partner-based UUID (PUUID) for the user.

pfield:string - If you entered a puserid that was ID swapped with BlueKai via

phints (for example, you used the BlueKai CoreTag to send the
puserid to BlueKai), you must do the following in order to use it for
sending and getting user data: 1. In the pfield parameter, enter the
type of key (fieldname) associated with the puserid you are passing.
The pfield is used to uniquely identify your puserid(s) in the
BlueKai platform. 2. Contact your BlueKai Account Manager to
enable your pfield in the BlueKai system.

idfa:string - If you are sending or getting data on an iOS mobile app user, enter the

Identifier for Advertising (IDFA) of the mobile iOS device.
Note: The data you are sending or getting is linked exclusively to the
IDFA, which operates in a primary ID space (the data is not linked to
a BKUUID). You do not need to pass the userid or puserid when passing the
idfa.If you pass both an idfa and a userid/puserid, the user will be
looked up based on the userid/puserid.

adid:string - If you are sending or getting data on an Android mobile app user,

enter the Google Advertising ID of the mobile Android device. Note: The
data you are sending or getting is linked exclusively to the AdID,
which operates in a primary ID space (the data is not linked to a
BKUUID). You do not need to pass the userid or puserid when
passing the adid.If you pass both an adid and a userid/puserid,
the user will be looked up based on the userid/puserid.

useragent:string - If you are sending or getting data on a mobile user (via their

BlueKai statistical ID), enter the user agent of the mobile device
and the ipaddress.

ipaddress:string - If you are sending or getting data on a mobile user (via their

BlueKai statistical ID), enter the IP address of the user's
mobile device and the useragent.

create_profile:string - Enter 1 to create a new user profile in the BlueKai Profile

Store, and add the categories specified in the phint field to it.

phint:string - Enter a phint or a list of phints (key-value pairs that represent user

attributes) to tag the user with. The maximum number of phints you
can pass is restricted by the maximum size of the HTTP GET
request, which is 2,048 bytes.
Syntax for passing multiple phints: category1=value&phint=category2=value
Example: v=123&phint=v=345

filterbycampids:string - Enter a campaign ID or a comma-separated list of campaign IDs

to filter the categories returned by the
User Data API based on the campaigns that won the user.

Syntax for passing multiple campaign IDs:
campaignId1=value&filterbycampids=campaignId2=value
Example: 44966&filterbycampids=41674

target:integer - By default, this flag is set to 1, which means that the User Data

API returns the categories that user has been tagged with. Enter 0
to disable user targeting and not return any user categories.
# File lib/bluekai/user_data.rb, line 81
def user_data(site_id, query)
  request('GET', "/getdata/#{site_id}/v1.2", query, nil)
end

Private Instance Methods

domain() click to toggle source
# File lib/bluekai/user_data.rb, line 87
def domain
  'http://api.tags.bluekai.com'
end