All Collections
API / Customization / Advanced
Advanced CSS, JavaScript and HTML
PeopleVine User Exits on the Portal Pages - Allows you to do something else upon something being completed
PeopleVine User Exits on the Portal Pages - Allows you to do something else upon something being completed
Updated over a week ago

PeopleVine User Exits provide you with the ability to add custom tagging, pixel tracking, custom actions and override page elements upon page load and actions being completed on a page. For example if you want to add a tracking mechanism once the contact us button is successfully submitted.

Follow these steps to put this into place:

  • Create a JavaScript file (name doesn't matter as long as it's not currently being used; e.g. don't use methods.js) (starter file)

  • Add the following to the <head> section of your page layout to call your JavaScript file:

<script src="http://cdn.peoplevine.com/..../...js" type="text/javascript"></script> 

This JavaScript file should contain the methods that will automatically be called when the user exit is ready to process.  Reference this list to setup your own user exits:

  • bookingConfirmed - after someone schedules an appointment successfully

  • contactUsSubmitted - after someone fills out the contact us form

  • commerceOrderPlaced - after someone places an order

  • commerceAddToCart - after someone adds an item to their shopping cart

  • contestBeginRegistration - after they've authenticated to register for the contest

  • contestScratchOffDisplayed - this is when they land on the scratch off page, but have not played yet.

  • contestScratchOffPlayed - after someone plays the scratch off and win contest

  • eventRegistered - after someone registers or purchases tickets for an event.

  • generalTracking - this is used on non action based pages to track landing on a specific page.  To know which page, see the javascript call userExit.generalTracking on the page you want to add javascript code

  • memberRegistered - after someone registers for a membership program

  • offerAccepted - after someone accepts an offer

  • paymentMade - after a payment is made via the standard payments screen

  • quoteSubmitted - after a quote is submitted

  • registerConfirmation - after they register via /register

  • signupSuccess - occurs after a person signs up for a service when you direct them to the standard sign up screen

  • surveyCompleted - after a survey is completed (only works on the default confirmation page)

  • verifyItemCompleted - after a coupon, membership card or a ticket is scanned and verified via the QR code

If you don't include a specific user exit in your file, then nothing will happen.

The user exits can contain any type of JavaScript that you would like to call on the page. If you need to update page elements or add a tracking pixel, you can leverage jQuery (or native JavaScript) to write it to the page.

generalTracking provides you access to a bunch of other actions in the platform. You can distinguish the call by checking the item matching one of the following: warning, verify, verification, terms, survey, signup_error, signup, search, schedule_book, schedule, reviews, review, register, quote_builder, privacy, payment, password_forgot, no_page, newsletters, newsletter_view, newsletter_share, newsletter_opt_out, newsletter_opted_out, membership_download, membership_print, membership_register, login, loyalty_points_missing, loyalty, login, gallery, faq, events, event_view, event_ticket, error, donation, business, business_listing, business_directory, coupon_view, coupon_error, coupon_enter, coupon, contest_loyalty, contest, contact_us, company, commerce_shop, commerce_home, commerce_receipt, commerce_product, commerce_deals, commerce_checkout, commerce_brands, blog_view, blog, admin_transactions, admin_subscriptions, admin_subscription_plan, admin_subscription, admin_scheduled, admin_schedule_booking, admin_orders, admin_memberships, admin_loyalty_activity, admin_loyalty, admin_group_menu, admin_events, admin_customer_payment_information, admin_customer_menu, admin_customer_create, admin_customer_addresses, admin_customer_address_create, admin_coupons, admin_affiliate_menu

Leverage this template for your customerUserExit.js file:

function contactUsSubmitted(data) {
//{first_name: "", last_name: "", email: "", mobile_number: "", opt_in_email: "True"}

}function commerceOrderPlaced(data) {
//{"transaction":{"id":12345,"affiliation":0,"revenue":123.45,"shipping":12.34,"tax":56.78,"city":"Chicago","state":"IL","country":"US"},"items":[{"id":1234,"name":"Product Name","sku":"Product Sku","attribute":"","price":123.45,"quantity":1}]}}function contestBeginRegistration(data) {
//{"email": "email"}

}function contestScratchOffDisplayed(data) {
//{"contest_no", 0}}function contestScratchOffPlayed(data) {
//{"contest_no", 0}}function registerConfirmation(data) {
//wi_customer_full object
//{"timezone":"","username":"","settings":"","generatePassword":false,"profile_photo":"","foursquare_handle":"","foursquare_id":"","customer_status":"active","attributes":[],"facebook_handle":"","twitter_handle":"","google_handle":"","instagram_handle":"","latitude":"0","longitude":"0","customer_no":330661,"first_name":"","last_name":"","address":"","address2":"","city":"","state":"","zip_code":"","country":"","phone_number":"","mobile_number":"","email":"","password":"","created_on":"","device_type":"","passbook_enabled":"N","wallet_enabled":"N","opt_in_email":"Y","opt_in_sms":"Y","opt_in_updates":"Y","company_no":0,"user_no":0,"company_name":"","birthdate":"","modified_on":"","address3":"","customer_reference":"","facebook_id":"","twitter_id":"","google_id":"","instagram_id":"","middle_name":"","website":"","customer_type":"customer"}

}function verifyItemCompleted(data) {
//{"header": "", "message": ""}}function surveyCompleted(data) {
//{"survey_no": 0}}function signupSuccess(data) {
//service_no, wi_customer_full object
//{service_no: 0, customer: {"timezone":"","username":"","settings":"","generatePassword":false,"profile_photo":"","foursquare_handle":"","foursquare_id":"","customer_status":"active","attributes":[],"facebook_handle":"","twitter_handle":"","google_handle":"","instagram_handle":"","latitude":"0","longitude":"0","customer_no":330661,"first_name":"","last_name":"","address":"","address2":"","city":"","state":"","zip_code":"","country":"","phone_number":"","mobile_number":"","email":"","password":"","created_on":"","device_type":"","passbook_enabled":"N","wallet_enabled":"N","opt_in_email":"Y","opt_in_sms":"Y","opt_in_updates":"Y","company_no":0,"user_no":0,"company_name":"","birthdate":"","modified_on":"","address3":"","customer_reference":"","facebook_id":"","twitter_id":"","google_id":"","instagram_id":"","middle_name":"","website":"","customer_type":"customer"}}

}function paymentMade(data) {
//{"purchase_order":"","raw_response":"","user_no":0,"payment_type":"","transaction_notes":"","affiliate_no":0,"group_id":"","first_name":"","last_name":"","transaction_no":0,"customer_no":0,"card_no":0,"reference_type":"","reference_no":0,"transaction_status":"","charged_on":"","transaction_response":"","transaction_attempts":0,"transaction_id":"","transaction_amount":0,"t_card_type":"","t_card_four":"","batch_id":"","matched":"N","company_no":0}"}function offerAccepted(data) {
//passComplete
//{"details":null,"company":{"timezone_id":"","timezone_offset":0,"settings":null,"subscription_no":0,"customer_no":0,"company_logo_byte":null,"company_icon_byte":null,"user_no":0,"company_no":0,"foregroundcolor":"","backgroundcolor":"","company_name":"","company_logo":"","company_icon":"","company_bio":"","web_site":"","company_email":"","company_phone":"","address":"","address2":"","city":"","state":"","zip_code":"","country":"","facebook_url":"","google_url":"","twitter_handle":"","created_on":""},"pass":{"wait_time":0,"expires_in":0,"serialNumber":"","redemption_process":"","pass_no":0,"pass_graphic":"","pass_type":"","pass_name":"","certificate_no":0,"company_no":0,"pass_description":"","redemption_type":"","foregroundColor":"","backgroundColor":"","scan_format":"","locations":"","created_on":"","updated_on":"","status":"","display":"","quantity_restriction":"","limited_to":0,"date_cutoff":"","pass_code":"","pass_keyword":"","survey_no":0,"bar_code_type":"auto","bar_code_value":""},"fields":[],"pass_downloaded":0,"pass_redeemed":0,"pass_viewed":0,"pass_url":"","locations":null,"generated":{"redeemed_no":0,"redeemed_via":null,"valid_on":"","expires_on":"","pass_type":"","company_no":0,"device_no":0,"generated_no":0,"pass_no":0,"created_on":"","status":"","redeemed_on":"","serialNumber":"","scan_code":"","redeemed_latitude":0,"redeemed_longitude":0,"redeemed_notes":"","customer_no":0}}

}function bookingConfirmed(data) {
//wi_schedule_book
//{"includeStatus":null,"reference_type":"","reference_no":0,"scheduleItem":{"details":null,"cal_subject":"","cal_location":"","cal_body":"","default_timezone":"","default_view":"","cutoff_booking":0,"maximum_distance":0,"allow_cancel":true,"schedule_item_graphic":"","appointment_location":"","bookedSlots":[],"availableSlots":[],"includeBooked":false,"includeSlots":false,"stats":{"totalSlotsAvailable":0,"totalSlotsBooked":0,"totalCustomersBooked":0},"schedule_item_no":0,"schedule_item":"","schedule_item_description":"","category_no":0,"block_type":"","business_location_no":0,"company_no":0,"user_no":0,"created_on":"","modified_on":"","itemDetailsFields":null,"includeItemDetails":false,"search_value":null,"sort_by":null,"return_total":0,"from_date":"","to_date":"","includeDetails":false,"timezone_offset":0,"timezone_id":null},"customer":{"customer_no":0,"first_name":"","last_name":"","address":"","address2":"","city":"","state":"","zip_code":"","country":"US","company_name":"","mobile_number":"","phone_number":"","email":"","latitude":"","longitude":"","profile_photo":""},"slot_fee":0,"schedule_item":"","slot_subject":"","slot_end":"","slot_start":"","includePast":false,"first_name":"","last_name":"","schedule_book_no":0,"schedule_item_no":0,"schedule_slot_no":0,"book_status":"","customer_no":0,"book_notes":"","transaction_no":0,"company_no":0,"user_no":0,"created_on":"","modified_on":"","itemDetailsFields":null,"includeItemDetails":false,"search_value":null,"sort_by":null,"return_total":0,"from_date":"","to_date":"","includeDetails":false,"timezone_offset":0,"timezone_id":null}

}function reviewPosted(data) {
//{review_item_no: 0}
}function quoteSubmitted(data) {
//{"customer":{wi_customer_full},"orderInfo":{"purchase_order":"","external_order_no":null,"order_sync":"","sync_status":"","last_sync":"","balance_due":0,"order_via":"","skipEmailConfirmation":false,"order_no":0,"customer_no":0,"order_date":"","customer_address_no":0,"order_status":"","order_total":0,"sub_total":0,"shipping_total":0,"tax_total":0,"discount_total":0,"tip_total":0,"sessionID":"","ip_address":"","created_on":"","modified_on":"","user_no":0,"company_no":0,"order_note":"","order_type":"","flag_paid":0,"flag_verified":0,"flag_pulled":0,"flag_shipped":0,"flag_completed":0,"flag_followup":0,"flag_returned":0,"flag_modified":0,"flag_paid_date":"","flag_verified_date":"","flag_pulled_date":"","flag_shipped_date":"","flag_completed_date":"","flag_followup_date":"","flag_returned_date":"","flag_modified_date":"","affiliate_no":0},"itemInfo":[{"customer_no":0,"company_no":0,"pull_quantity":0,"created_on":"","product":{"product_relation_no":0,"relation_type":"","product_sku":"","description":"","product_no":0,"inventory":0,"product_short":"","main_photo":"","price":0,"pricing":null},"order_item_no":0,"order_no":0,"product_no":0,"order_price":0,"order_quantity":0,"product_attributes":"","ip_address":"","session_id":"","itemDetailsFields":null,"includeItemDetails":false,"search_value":null,"sort_by":null,"return_total":0,"from_date":"","to_date":"","includeDetails":false,"timezone_offset":0,"timezone_id":null}],"payments":[],"notes":null}}function memberRegistered(data) {
//if membership
//{membership: Object, membership_details: Object, surveyResults: null, loyalty_card: Object, pointBalance: 0}
//if loyalty
//{"linked":{"toContest":false,"contest_no":0},"point_dollar_value":0.00,"stats":{"totalUniqueActivities":0,"totalProgramMembers":0,"totalActivities":0,"totalPointsEarned":0},"membership":{"membership_card_no":0,"pending_approval":false,"isLoyaltyProgram":false,"membership_loyalty_no":0,"rank_type":"","membership_summary":"","membership_details":"","membership_graphic_byte":null,"stats":{"totalMembers":0,"activeMembers":0,"cancelledMembers":0,"pendingMembers":0,"failedMembers":0,"totalScans":0,"successfulScans":0},"service_no":0,"membership_no":0,"membership_title":"","membership_disclaimer":"","membership_graphic":"photo","memberid_value":"@@auto@@","field1_title":"Name","field1_value":"@@member_name@@","field2_title":"","field2_value":"","field3_title":"Joined","field3_value":"@@start_date@@","field4_title":"Membership Number","field4_value":"@@membership_number@@","field5_title":"","field5_value":"","field6_title":"","field6_value":"@@field6_value@@","survey_no":0,"foregroundColor":"0","backgroundColor":"0","certificate_no":0,"company_no":0,"scan_format":"PKBarcodeFormatQR","status":"id","created_on":"","details":null},"membership_loyalty_no":0,"membership_no":0,"rank_type":"","point_multiplier":0,"points_minimum":0,"auto_achieve":"N","company_no":0,"created_on":"","points_duration":"","details":null}

}function eventRegistered(data) {
//[{"scan_location":"","scanned_by":"","scanned_no":0,"company_no":0,"first_name":"","last_name":"","ticket_title":"","ticket_description":"","event_ticket_log_no":0,"event_no":0,"event_ticket_no":0,"purchase_date":"","ticket_serial":"","ticket_status":"","customer_no":0,"ticket_price":0,"transaction_no":0,"scan_date":"","affiliate_no":0,"ticket_notes":""}]

}function commerceAddToCart(data) {
// {product_no: 0}

}function generalTracking(item, data) {
//warning, verify, verification, terms, survey, signup_error, signup, search, schedule_book, schedule, reviews, review, register, quote_builder, privacy, payment, password_forgot, no_page, newsletters, newsletter_view, newsletter_share, newsletter_opt_out, newsletter_opted_out, membership_download, membership_print, membership_register, login, loyalty_points_missing, loyalty, login, gallery, faq, events, event_view, event_ticket, error, donation, business, business_listing, business_directory, coupon_view, coupon_error, coupon_enter, coupon, contest_loyalty, contest, contact_us, company, commerce_shop, commerce_home, commerce_receipt, commerce_product, commerce_deals, commerce_checkout, commerce_brands, blog_view, blog, admin_transactions, admin_subscriptions, admin_subscription_plan, admin_subscription, admin_scheduled, admin_schedule_booking, admin_orders, admin_memberships, admin_loyalty_activity, admin_loyalty, admin_group_menu, admin_events, admin_customer_payment_information, admin_customer_menu, admin_customer_create, admin_customer_addresses, admin_customer_address_create, admin_coupons, admin_affiliate_menu,  
switch (item) {
case "":

break;
}

}
Did this answer your question?