List of completed guides for a viditor
Hi all,
I am new to Pendo.
I was wondering if there is a way to get all the completed guides for a particular visitor through an API.
I am trying to show the progress of the user's learning curve and show some type of % complete of all the guides we are offering.
Thank you
0
コメント
Hey Alex,
This is an interesting ask. There's no specific data point "out-of-the-box" that is used to determine completion of a guide. However, if you assume that a completed guide means that there is a dismiss event on the last step of a guide, you could use something like this.
{"response": {
"mimeType": "application/json"
},
"request": {
"pipeline": [
{
"source": {
"guidesSeenEver": null
}
},
{ // return only identified visitors
"identified": "visitorId"
},
{ // add in your visitor or replace with a segment operator
"filter": "visitorId == `myVisitor`"
},
{ // filter only to completed guide steps
"filter": "lastState == `dismissed`"
},
{ // find the last step of the guide.
// disclaimer: this only returns results based only on the guide as it exists now.
// guides with added/removed last steps while live may not return as expected
"merge": {
"fields": [ // match the previous results on guide and step
"guideId",
"guideStepId"
],
"mappings": { // bring over these fields
"numSteps": "numSteps",
"guideName": "guideName",
"lastStep": "lastStep"
},
"pipeline": [
{
"source": {
"guides": null
}
},
{ // get the last step in the steps array
"eval": {
"numSteps": "len(steps)",
"guideStepId": "steps[-1].id"
}
},
{ // add a boolean lastStep to use later on as a filter
"select": {
"guideId": "id",
"numSteps": "numSteps",
"guideStepId": "guideStepId",
"guideName": "name",
"lastStep": "true"
}
}
]
}
},
{ // filter out anything unmatched between the two datasets
"filter": "!isNil(lastStep)"
},
{
"select": {
"guideId": "guideId",
"guideName": "guideName",
"visitorId": "visitorId",
"lastCompleted": "lastSeenAt",
"numSteps": "numSteps"
}
}
]
}
}
サインインしてコメントを残してください。