Branko Šuligoj edited this page Dec 9, 2015 · 5 revisions

Snoopy also provides API to integrate it with other third party applications.

SnoopyBehavioralScoring.getVisitorsScores ()

Returns DataTable of visitors with their scores and heat statuses. (Also used for custom report)

SnoopyBehavioralScoring.getVisitorIdsToScore ()

Returns IDs from visitors that reached goals specified to start scoring. You specify which goals are mark to start scoring in plugin configuration.

SnoopyBehavioralScoring.getScore (idvisitor)

Returns only score for visitor ID that is provided as parameter. Scores are not recalculated they are returned from previously calculated data.

SnoopyBehavioralScoring.storeVisitorData (idvisitor, data)

Stores visitor data. Data about visitor is provided as parameter and must be in php array format. Accepted format is following:

$data = array(
    'custom_1' => "Some data",        // Reserved for email address (255 chars)
    'custom_2' => "Some custom data", // (255 chars)
    'custom_3' => "Some data3",       // (255 chars)
    'custom_4' => "Some data",        // (Long text)
    'custom_5' => "Some data"         // Reserved for json format(Long text)

SnoopyBehavioralScoring.getVisitorEmail (idvisitor)

Returns visitor Email from json in custom_5 field in database. If multiple emails are in json it returns all of them. Email is not stored anywhere, it is just parsed from json in custom_5.

SnoopyBehavioralScoring.getVisitorEmailFromJson (json_data)

It returns same thing as SnoopyBehavioralScoring.getVisitorEmail () the only difference is that it gets email from json passed as parameter and not from database.

SnoopyBehavioralScoring.matchVisitorsEmail ()

Loops trough all visitors and returns their email addresses found in custom_5 field (json). Data is NOT stored anywhere!

SnoopyBehavioralScoring.storeVisitorsEmail ()

Same as SnoopyBehavioralScoring.matchVisitorsEmail (), but this time emails are stored in custom_1 field.

SnoopyBehavioralScoring.findHeatStatus (idvisitor)

Finds and returns heat status. Status is not stored anywhere and it is calculated from previous scores.

SnoopyBehavioralScoring.storeHeatStatuses ()

Recalculate and stores heat statuses for each visitor.

SnoopyBehavioralScoring.heatStatus (idvisitor)

Returns already stored heat status from database.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.