cool-cricket-46418
07/11/2023, 8:01 PMIdentify method. I've got anonymous tracking working (i.e. script installed, page views being collected in RudderStack) however I'm at a loss for how to implement the Identify method.
I already have JavaScript on my site that provides information when someone is logged in. I'm hoping to "bind" RudderStack Identify to this somehow. Can you please help?cool-cricket-46418
07/11/2023, 8:03 PM<script type="text/javascript">
window.circleUser = {
firstName: 'Casey',
lastName: 'Schorr',
name: 'Casey Schorr',
email: 'email@gmail.com',
isAdmin: 'true',
isModerator: 'false',
publicUid: 'a0c1a6d0',
location: '',
websiteUrl: '',
linkedinUrl: '',
twitterUrl: '',
facebookUrl: '',
signedIn: true
}
</script>cool-cricket-46418
07/11/2023, 8:04 PM<script type="text/javascript">
window.circleUser = {
signedIn: false
};
</script>cool-cricket-46418
07/11/2023, 8:27 PMidentify with a new userId
I don't know what I should pass for userId.
• Do I have to provide a userId?
• ActiveCampaign uses email as the main ID. Do I set userId to the email address? Or is that best sent as a trait? The example identify call in the ActiveCampaign documentation is confusing to me as it has userId in the code (i.e. no actual userId) https://www.rudderstack.com/docs/destinations/streaming-destinations/activecampaign/#identify
• I have a publicUid available to me from the javascript (see code example above) I could use, but that's really just for this website and doesn't necessarily represent our "key" for each user. We also have auth0 for example, which has different ID for the user.
apologies in advance, I am more on the business/marketing side hacking this together vs a sophisticated developerhundreds-lifeguard-65770
07/11/2023, 8:37 PMhundreds-lifeguard-65770
07/11/2023, 8:37 PMhundreds-lifeguard-65770
07/11/2023, 8:40 PMcool-cricket-46418
07/11/2023, 8:40 PMuserId what happens?
Here's a test call I made just now into our account not passing anything for userId (but I am including the email)
{
"anonymousId": "bc5774bf-6656-4d8b-a99a-841f707ac5ee",
"channel": "web",
"context": {
"app": {
"name": "RudderLabs JavaScript SDK",
"namespace": "com.rudderlabs.javascript",
"version": "2.37.0"
},
"campaign": {},
"library": {
"name": "RudderLabs JavaScript SDK",
"version": "2.37.0"
},
"locale": "en-US",
"os": {
"name": "",
"version": ""
},
"page": {
"initial_referrer": "https://tagassistant.google.com/",
"initial_referring_domain": "tagassistant.google.com",
"path": "/home",
"referrer": "https://tagassistant.google.com/",
"referring_domain": "tagassistant.google.com",
"search": "?gtm_debug=1689107520856",
"tab_url": "https://www.hedgian.com/home?gtm_debug=1689107520856",
"title": "Home | Hedgian",
"url": "https://www.hedgian.com/home?gtm_debug=1689107520856"
},
"screen": {
"density": 2,
"height": 1440,
"innerHeight": 1358,
"innerWidth": 1713,
"width": 2560
},
"sessionId": 1689106503772,
"traits": {
"email": "caseyschorr@gmail.com"
},
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
},
"integrations": {
"All": true
},
"messageId": "4e16f113-5f5c-4a45-917d-b202bac4b752",
"originalTimestamp": "2023-07-11T20:32:03.324Z",
"rudderId": "2d8aa327-b346-406e-8255-a3a5ebe2105d",
"sentAt": "2023-07-11T20:32:03.324Z",
"type": "identify",
"userId": ""
}hundreds-lifeguard-65770
07/11/2023, 8:41 PMcool-cricket-46418
07/11/2023, 8:42 PMhundreds-lifeguard-65770
07/11/2023, 8:42 PMcool-cricket-46418
07/11/2023, 8:43 PMcool-cricket-46418
07/11/2023, 8:44 PMhundreds-lifeguard-65770
07/11/2023, 8:45 PMhundreds-lifeguard-65770
07/11/2023, 8:46 PMcool-cricket-46418
07/11/2023, 8:46 PMhundreds-lifeguard-65770
07/11/2023, 8:46 PMcool-cricket-46418
07/11/2023, 8:46 PMhundreds-lifeguard-65770
07/11/2023, 8:48 PMhundreds-lifeguard-65770
07/11/2023, 8:49 PMcool-cricket-46418
07/11/2023, 8:49 PMcool-cricket-46418
07/11/2023, 8:49 PMcool-cricket-46418
07/11/2023, 9:06 PMcool-cricket-46418
07/11/2023, 9:40 PMuserId using a webhook, will that update the Javascript SDK userid ?cool-cricket-46418
07/11/2023, 9:43 PMhundreds-lifeguard-65770
07/11/2023, 9:45 PMcareful-memory-76059
07/12/2023, 6:09 AM