Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
for more information, see https://pre-commit.ci
Docker builds report
|
…/flagsmith into fix/hubspot-attribution-issues
|
Thanks for the detailed feedback.
Definitely, let me know if this feels clearer
That should be the case, more precisely there are 2 entrypoints:
Additionally, I added a basic retry with backoff in create_lead_form, without raising for now |
matthewelwell
left a comment
There was a problem hiding this comment.
The code look a LOT cleaner now - so much easier to follow. I've added a few more comments, but I think that we're pretty close.
I've resolved all of the previous comments as well.
Co-authored-by: Matthew Elwell <matthew.elwell@flagsmith.com>
…t-attribution-issues
| if ( | ||
| HubspotTracker.objects.filter(hubspot_cookie=hubspot_cookie) # type: ignore[misc] | ||
| .exclude(user=request.user) | ||
| .exclude(user=track_user) | ||
| .exists() | ||
| ): | ||
| logger.info( | ||
| f"HubspotTracker could not be created for user {request.user.id}" | ||
| f"HubspotTracker could not be created for user {track_user.id}" | ||
| f" due to cookie conflict with cookie {hubspot_cookie}" | ||
| ) | ||
| return |
There was a problem hiding this comment.
@matthewelwell , I think we can remove this guard and allow for multiple identical cookies (cf the user who created 3 accounts. We lost the info on the account we cared about)
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature!Changes
create_lead_formwith or without cookie) and savesHubspotLeadsa) If organisation was just created and exists in hubspot => get company data from hubspot, saves the
HubspotOrganisationobject with correct idb) if doesn't exist in hubspot for X reason => creates it and saves hubspot ID
How did you test this code?
Please describe.
Functionally:
Set
"ENABLE_HUBSPOT_LEAD_TRACKING": "True"andHUBSPOT_ACCESS_TOKENCreate user, organisation, invite users