# Hubspot Identify User With a Module

**URL:** <https://community.hubspot.com/t/hubspot-identify-user-with-a-module/70326>\
**Category:** APIs & Integrations\
**Tags:** events\
**Created:** [December 1, 2022, 2:30am UTC](https://community.hubspot.com/t/hubspot-identify-user-with-a-module/70326 "2022-12-01T02:30:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SRitchot](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sritchot/32/82797_2.png) [@SRitchot](https://community.hubspot.com/u/SRitchot)\
**Post date:** [December 1, 2022, 2:30am UTC](https://community.hubspot.com/t/hubspot-identify-user-with-a-module/70326/1 "2022-12-01T02:30:11Z")

</div>

Hi, I want to set the identity of the User using a Module created on Hubspot in the section Design tools. I have seen the Tracking Code API and did try the code example given in the module. But this is not working. Can you guide me?

/\*  
The below example gets the value of a query string parameter ‘?email=’  
and uses that to identify the visitor  
\*/  
function getParameterByName(name) {  
var match = RegExp(‘[?&]’ + name + ‘=([^&]\*)’).exec(window.location.search);  
return match && decodeURIComponent(match[1].replace(/\+/g, ’ '));  
}  
var \_hsq = window.\_hsq = window.\_hsq || [];  
\_hsq.push([“identify”,{  
email: getParameterByName(“email”)  
}]);

// Track the page view for the new page  
\_hsq.push([‘trackPageView’]);  
console.log(getParameterByName(“email”));

window.location.replace(“[https://www.example.com/](https://www.example.com/)”);

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [December 6, 2022, 4:15pm UTC](https://community.hubspot.com/t/hubspot-identify-user-with-a-module/70326/2 "2022-12-06T16:15:23Z")

</div>

Hi, @SRitchot 👋 Were you able to make some progress on this project? — Jaycee

---

<div class="post-metadata">

**Author:** ![SRitchot](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sritchot/32/82797_2.png) [@SRitchot](https://community.hubspot.com/u/SRitchot)\
**Post date:** [December 6, 2022, 7:17pm UTC](https://community.hubspot.com/t/hubspot-identify-user-with-a-module/70326/3 "2022-12-06T19:17:14Z")

</div>

Hi [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074), I wasn’t able to make any progress on this.
