Experiencing problems? Try these troubleshooting steps.

Track the page source of embedded videoasks

Have you embedded your videoask across multiple pages on your website? Wouldnā€™t it be useful to know exactly which page your respondent was on when they interacted with it?

If youā€™re on a paid plan, you can use custom variables to track which page your responses are coming from.

Jump to:

Use custom variables to track the page source of your videoask

Add the page source automatically to your widget

Add the page source automatically to your iframe

Use custom variables to track the page source of your videoask

Create a custom variable for your videoask URL and replace the placeholder information with your page name.

1

From your VideoAsk account, click the Share & Embed icon on your videoask.

2022-11-09_13-53-04.png

2

Click Add variables.

mceclip0.png

3

Select + Add custom variable.

mceclip1.png

4

Choose a name for your variable and click Save. In this example, weā€™ll name the variable ā€œsourceā€.

mceclip2.png

Note: Custom variables must be alphanumeric, all lowercase and you must_use_underscores_to_separate_words.

5

Click Embed in a website.

mceclip3.png

6

Choose Iframe or Widget from the dropdown.

mceclip4.png

7

Click Copy embed code.Ā 

mceclip5.png

8

Paste the code into a page on your website.

Source_page07.png

9

Now, go back to VideoAsk and copy the videoask link. This URL includes the variable youā€™ve added.

mceclip6.png

10

Then, go back to your website builder. Replace the URL in the embed code with the updated URL that includes your variable.

Source_page10.gif

11

Replace the variable placeholder (xxxx) with the page name on your website and youā€™re good to go!Ā 

Source_page_11a.pngSource_page11b.png

Repeat steps 5-10 for each page youā€™d like to embed your videoask on. Make sure to replace the variable placeholder information with the specific page name.

12

Now, when a respondent answers your embedded videoask with variables, the page name will display with their response when you hover over the ā“˜ symbol.

Source_page12.png

Add the page source automatically to your widget

If youā€™re embedding a videoask widget across multiple pages on your website, you can add a little bit of code magic to automatically pull your page name into the variable. Follow the steps below to learn how.

1

From your VideoAsk account, click the Share & Embed icon on your videoask.

2022-11-09_13-53-04.png

2

Click Add variables.

mceclip0.png

3

Select + Add custom variable.

mceclip1.png

4

Choose a name for your variable and click Save. In this example, weā€™ll name the variable ā€œsourceā€.

mceclip2.png

5

Click Embed in a website.

mceclip3.png

6

Choose Widget from the dropdown.

mceclip8.png

7

Choose the Widget style, Position (left or right), Color, and add any Overlaying text.

mceclip9.png

8

When youā€™re happy with your widget design, click CopyĀ embed code.

mceclip10.png

9

Paste the widget code into a page on your website.

Source_page17.png

10

Copy the code below and paste it under <script> in your widget code.Ā 

const pathname = window.location.pathname;

Source_page18.png

11

Now, go back to VideoAsk and copy the videoask link. This URL includes the variable youā€™ve added.

mceclip6.png

12

Replace the URL in your embed code with the updated URL that includes your variable.

Source_page21.png

13

Delete the variable placeholder (xxxx) and type + pathname after your videoask URL. This will automatically pull your page name as the variable.

Source_page22.png

14

Thatā€™s it! You can now copy the new widget code youā€™ve created and paste it into any page on your website. The page name for your variable will be dynamically populated.

When a respondent answers your videoask widget, youā€™ll see the page name with their response when you hover over the ā“˜ symbol.

Source_page23.png

Add the page source automatically to your iframe

If youā€™re embedding an iframe across multiple pages on your website, you can add a little bit of code magic to automatically pull your page name into the variable. Follow the steps below to learn how.

1

Copy the custom code below and paste it within the <body> tags of the HTML on your website.

<script>

const pathname = window.location.pathname;
var iframe = document.createElement('iframe');
iframe.setAttribute('id', 'iframe');
iframe.style.width = "640px";
iframe.style.height = "480px";
iframe.style.border = "none";
iframe.allow = "camera *; microphone *; autoplay *; encrypted-media *; fullscreen *; display-capture *;"

document.body.appendChild(iframe);

iframe.setAttribute('src', 'YOUR_VIDEOASK_URL_HERE#source=' + pathname, 'allow', '"camera *; microphone *; autoplay *; encrypted-media *; fullscreen *; display-capture *;"', 'width', '"100%"', 'height', '"600px"', 'style', '"border: none; border-radius: 24px"');

</script>

Source_page24.png

2

Back in your videoask account, click the Share & Embed icon on the videoask you would like to embed.

2022-11-09_13-53-04.png

3

Select Add variables.

mceclip0.png

4

Select + Add custom variable.

mceclip1.png

6

Choose a name for your variable and click Save. In this example, weā€™ll name the variable ā€œsourceā€.

mceclip2.png

7

Click Copy to copy the videoask URL.

mceclip11.png

8

Next, replace the videoask URL placeholder in the custom code with the videoask URL you've copied from step 6.

Source_page30a.pngSource_page30b.png

9

Delete the placeholder (XXXX) from the videoask URL.Ā 

Source_page31.png

10

If you'd like to adjust the size of your iframe, you can edit the pixel size next to iframe.style.width and iframe.style.height.

Source_page32.png

11

That's it! You can now copy the new iframe code you've created and paste it into any page on your website. The page name for your variable will be dynamically populated.

When a respondent answers your videoask, you'll see the page name with their response when you hover over the ā“˜ symbol.

source_page33.png

šŸ’” Tip: Export your responses to a .csv or .xlsx file to analyze them. Information collected from your custom variable will be included in the file.

Can't find what you're looking for?