The UserIQ Guided Tour API gives development teams more control over how guided tours are presented and can support sophisticated event triggers. The UserIQ Guided Tour API is available on any page that contains the UserIQ Javascript Tracking Code.
The UserIQ Javascript snippet gives you access to the UserIQ object, which is used to invoke the Guided Tour API methods.
UserIQ.listTours(meetsTargetCriteria)
The method UserIQ.getTours(meetsTargetCriteria) returns an array of the available Guided Tours available.
Parameters
- meetsTargetCriteria - (Optional) If you pass true into the listTours method, UserIQ will return only tours that would meet target criteria for the current user. If you pass false or nil, UserIQ will return all active Guided Tours available.
Response
An array of guided tours with the following attributes:
- tour_id - Unique ID used by UserIQ to identify tours
- tour_name - Name given to the Guided Tour
- target_url - URL where Guided Tour was recorded or is targeted
Example:
JavaScript
tours = UserIQ.listTours(true);
UserIQ.getTour(tour_id)
The method UserIQ.getTour(tour_id) will return a UserIQ.Tour object.
Parameters
- tour_id - (Required) Use a tour_id returned from the the getTours() method.
Response
- UserIQ.Tour object - If successfully retrieved.
- false - If unable to start due to error.
Example:
JavaScript
UserIQ.getTour(99999);
UserIQ.Tour Methods
- next() - Advance to the next step, in the order they were added
- back() - Show the previous step, in the order they were added
- cancel() - Trigger cancel on the current step, hiding it without advancing
- hide() - Hide the current step
- show([id]) - Show the step specified by id (if it's a string), or index (if it's a number) provided. Defaults to the first step.
- start() - Show the first step and begin the tour
- getCurrentStep() - Returns the currently shown step
Comments
0 comments
Please sign in to leave a comment.