Identify user by email only trigger feedback survey after reloading page

When my page is load, I expect to see a NPS survey, but it only shows after a page refresh.

Steps to reproduce is:
- I open my page in a browser without HubSpot cookies(nothing happen, no NPS survey);
- Refresh page(NPS shows up);

I create a super simple html file where I identify user by email and load Hubspot script. You can see it here, Identify user HubPost · GitHub. You can think in this page as a cool landing page where I already know my customer email and I want to show feedback survey.

I want to make NPS appears on first access, how can I make it works?

Hi, @Anonymous :waving_hand: Welcome to our community. Thanks for your question.

To help the community better understand your project, it would be useful to have more context about your implementation:

  • Are you using a specific HubSpot NPS tool, or is this a custom implementation?
  • How is the NPS survey being loaded? Is it part of the page’s HTML or loaded via JavaScript?
  • Are there any error messages in the browser console when the page initially loads?

Providing such context can help others understand your situation and provide more accurate solutions.

Here are a few general steps you can try:

  • Check for script loading order: Is everything loaded in the correct order?
  • Investigate script execution timing: The survey script might be executing before the HubSpot user identification is completed. One suggestion is to try wrapping the survey script in a callback function that only runs after the user identification is complete
  • Look for errors
  • Test across browsers

When you provide more context and information about your implementation, it’ll be easier to identify the root cause of the problem and offer a more accurate solution.

Best,

Jaycee

I`m just using standart NPS survey from hubspot.
NPS is loaded by HS script, standart way.
No messages, no erros, just dont works i expected.

<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="UTF-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <title>Document</title>
</head>
<body>
 <script>
 var _hsq = window._hsq = window._hsq || [];
 _hsq.push(["identify",{
 email: 'my@email.com',
 }]);
 </script>

 <!-- Start of HubSpot Embed Code -->
 <script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/XXXXXXX.js"></script>
 <!-- End of HubSpot Embed Code -->
</body>
</html>

Everything works, but the page need to be refreshed, it do not works open my landing page for the first time in a new browser.

Do you have any updates? I have the same problem, surveys are not showing immediately with identify, the page need to be reloaded.

I found Hubspot works just setting the cookie, so refresh needs to happen, this is the way hubspot works. It just dont works the way i need, se i need to find another service.