Skip to content

Validating SDK Integration

ST P edited this page Feb 21, 2024 · 22 revisions

SDK Configuration:

Check an input focus event (https://ac.cnstrc.com/behavior?...&action=focus)

Expectation URL Parameters Required
We should see the expected hostname defaults to ac.cnstrc.com yes
We should see the expected API key key in query string yes
We should see segments to target search redirects us in query string highly suggested
We should see test name and test cells ef-testname=testcell in query string if A/B testing

User States and Personalization

Check an input focus event (https://ac.cnstrc.com/behavior?...&action=focus)

Expectation Details Requirement
We should see a user identifier for personalization when logged in ui in query string should be present
We should not see a user identifier for personalization when logged out ui in query string should be missing

Validate Input Focus

  • We should see the 'focus' event fire whenever focusing in on the search bar
  • We should see a network event containing:
    • text within the search bar (term query string parameters)
Screen Shot 2021-04-15 at 8 58 08 AM

Validate Selecting a Autocomplete Suggestion

  • We should see the 'autocomplete select' event fire when selecting a suggestion in the autocomplete
  • We should see a network event containing:
    • term from the search bar (original_query query string parameters)
Screen Shot 2021-04-15 at 8 58 46 AM

Validate Submitting a Search

  • We should see the search submit event fire when submitting a search term
  • We should see a network event containing:
    • search term (original_query query string parameters)
Screen Shot 2021-04-15 at 8 58 57 AM

Validate Search Result Loaded

  • We should see the 'search result loaded' event fire when landing on a search page
  • We should see a network event containing:
    • search term (term query string parameters)
    • total number of results (result_count query string parameters)
Screen Shot 2021-04-15 at 8 59 07 AM

Validate Search Result Clicked

  • We should see the 'search result click' event fire clicking on a item on a search page
  • We should see a network event containing:
    • item's name (name query string parameters)
    • item's id (customer_id query string parameters)
Screen Shot 2021-04-15 at 11 55 58 AM

Validate Browse Result Loaded

  • We should see the 'browse result loaded' event fire when landing on a browse page
  • We should see a network event containing:
    • event's filter name (filter_name request payload)
    • event's filter value (filter_value request payload)
    • total number of results (result_count request payload)
Screen Shot 2021-04-14 at 5 11 23 PM

Validate Browse Result Clicked

  • We should see the 'browse result click' event fire when clicking on a item on a browse page
  • We should see a network event containing:
    • event's filter name (filter_name request payload)
    • event's filter value (filter_value request payload)
    • item's id (item_id request payload)
    • item's position in the item grid (result_position_on_page request payload)
Screen Shot 2021-04-14 at 5 11 47 PM

Validate Recommendation Result View

  • We should see the 'recommendation result view' event fire when the user scrolls past a recommendation carousel/pod.
  • We should see a network event containing:
    • event's pod id (pod_id request payload)
    • number of results viewed (num_results_viewed request payload)
Screenshot 2024-02-08 at 10 46 01 PM

Validate Recommendations Result Clicked

  • We should see the 'recommendations result click' event fire when clicking on a recommendation item.
  • We should see a network event containing:
    • event's pod id (pod_id request payload)
    • item's id (item_id request payload)
Screenshot 2024-02-08 at 10 39 45 PM

Validate Add to Cart

  • We should see the 'conversion' event fire when adding an item to the cart
  • We should see a network event containing:
    • item's name (name query string parameters)
    • item's id (customer_id query string parameters)
    • item's price (revenue query string parameters)
Screen Shot 2021-04-14 at 5 12 28 PM

Validate Purchase

  • We should see the 'purchase' event fire when making a purchase
    • trackPurchase
    • https://ac.cnstrc.com/v2/behavioral_action/purchase
  • We should see a network event containing:
    • total cost (revenue request payload)
    • order id (order_id request payload)
    • items being purchased (items request payload)
 items: [
           { 
             item_id: '6501SB', // Required - Product ID 
             variation_id: '387758'. // Optional - Variation ID
           },
           {
             item_id: 'SB82',
             variation_id: '386874',
           },
           . . .
         ]