Contact Us

Integrations

Pendo Help CenterIntegrationsTrack Pendo guide events in Segment

Track Pendo guide events in Segment

Create or modify guide template

Below is an example of how you can track Pendo guide events in Segment.

note: The following assumes you are using standard classes for your dismiss and advance elements.

analytics.track('guideSeen', { guideId: guide.id, stepId: step.id });

(function wireGuideAdvanceButton (step) {
    step && step.attachEvent(step.guideElement[0], 'click', function (e) {
        var advanceButton = pendo.dom(e.target || e.srcElement).closest('._pendo-guide-next_');
        if (advanceButton.length) {
            analytics.track('guideAdvanced', { guideId: guide.id, stepId: step.id });
            console.log('hello');
        }
        var dismissButton = pendo.dom(e.target || e.srcElement).closest('._pendo-close-guide_');
        if (dismissButton.length) {
            analytics.track('guideDismissed', { guideId: guide.id, stepId: step.id });
        }
    });
})(step,guide);
© 2018 Pendo  |  Terms of Service  |  Privacy Policy