Embedding Microsurveys
Trove is built in a way to make it as easy as possible to launch your Microsurveys. All you have to do is embed the Trove script once and you can design and launch new Microsurveys without touching an
When you create a Microsurvey, in the embed step you're provided with a few code samples. In these code samples there is a
data-trove-team
attribute. This is your team ID and will remain the same for every Microsurvey you create.You'll need this ID. In the header of you website, copy and past the following and insert your team ID:
<script
defer
src="https://static.caravelapp.com/capture.js"
data-trove-team="<your-team-id>"
></script>
That's it! Embed it and forget it!
Make sure this script is embedded everywhere you would like Microsurveys to be available.
Then from the Trigger step in the Microsurvey UI you can target specific URLs or buttons to popup your Microsurvey.
If you'd like to pass in a logged in user's email, instead of prompting them for their email in the Microsurvey, you can do that with the
data-trove-email
attribute:<script
defer
src="https://static.caravelapp.com/capture.js"
data-trove-team="<your-team-id>"
data-trove-email="[email protected]"
></script>
The inline option enables you to embed a Microsurvey within the HTML of your site, instead of popping it up as a modal. Simply specify
data-trove-inline
on the HTML element you want the Microsurvey to load within and specify the survey ID to load with data-trove-survey
<div
data-trove-inline
data-trove-survey="<your-survey-id>"
></div>
Optionally, you can pass in the user email to associate logged in users with submitted feedback.
<div
data-trove-inline
data-trove-survey="<your-survey-id>"
data-trove-email="[email protected]"
></div>
Last modified 1yr ago