-
Notifications
You must be signed in to change notification settings - Fork 37
Client side lead & sale tracking #227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
7e5511c
lead tracking
devkiran fe94a5c
Update client-side-lead-tracking.mdx
devkiran 5f6b5b2
Update client-side-sale-tracking.mdx
devkiran f344fce
use snippets, rearrange
steven-tey e82a8b7
Merge branch 'main' into client-tracking-lead-sale
devkiran 0b84ff4
Update client-side-lead-tracking.mdx
devkiran b6c2b6b
Update client-side.mdx
devkiran 10bb414
Update client-side-lead-tracking.mdx
devkiran 268fe69
Update client-side-lead-tracking.mdx
devkiran 94c6f9c
add screenshots
devkiran d2fab2e
update the conversion docs
devkiran fce92cd
Merge branch 'main' into client-tracking-lead-sale
steven-tey 7b5d9c5
lead tracking
devkiran 3f896de
sale tracking
devkiran 1c47379
Update client-side.mdx
devkiran 87d3399
Refactor client-side tracking documentation to include installation s…
devkiran cf35def
Update conversions/sales/client-side.mdx
devkiran 7ab1925
Update snippets/client-side-lead-tracking.mdx
devkiran e8b4738
Update snippets/client-side-sale-tracking.mdx
devkiran 8abbd7f
update docs.json + titles
steven-tey 2fb9244
final changes
steven-tey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: Client-side tracking | ||
og:title: Client-side lead tracking with Dub | ||
description: Learn how to track lead conversion events with Dub using client-side tracking | ||
--- | ||
|
||
import LeadsIntro from "/snippets/leads-intro.mdx"; | ||
import ClientSideLeadTracking from "/snippets/client-side-lead-tracking.mdx"; | ||
import ClientSideTrackingInstall from "/snippets/client-side-tracking-install.mdx"; | ||
import LeadsOutro from "/snippets/leads-outro.mdx"; | ||
|
||
<LeadsIntro /> | ||
|
||
## Prerequisites | ||
|
||
Before you get started, make sure you follow the [Dub Conversions quickstart guide](/conversions/quickstart) to get Dub Conversions set up for your links: | ||
|
||
1. [Enable conversion tracking for your links](/conversions/quickstart#step-1%3A-enable-conversion-tracking-for-your-links) | ||
|
||
<ClientSideTrackingInstall /> | ||
|
||
## Client-side lead tracking | ||
|
||
<ClientSideLeadTracking /> | ||
|
||
<Warning> | ||
Client-side conversion tracking comes with some limitations: - **Ad | ||
blockers**: Users with ad blockers may prevent tracking scripts from loading - | ||
**JavaScript disabled**: Events won't be tracked if users have JavaScript | ||
disabled - **Network issues**: Failed network requests won't retry | ||
automatically - **Privacy concerns**: Some users may block client-side | ||
tracking for privacy reasons For more accurate conversion tracking, consider | ||
using [server-side conversion tracking](/api-reference/endpoint/track-lead). | ||
</Warning> | ||
|
||
<LeadsOutro /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
title: Client-side tracking | ||
og:title: Client-side sale tracking with Dub | ||
description: Learn how to track sales conversion events with Dub on the client-side | ||
--- | ||
|
||
import ClientSideTrackingInstall from "/snippets/client-side-tracking-install.mdx"; | ||
import ViewConversions from "/snippets/view-conversions.mdx"; | ||
import ClientSideSaleTracking from "/snippets/client-side-sale-tracking.mdx"; | ||
|
||
When it comes to [conversion tracking](/conversions/quickstart), a `sale` event happens when a user purchases your product or service. Examples include: | ||
|
||
- Subscribing to a paid plan | ||
- Usage expansion (upgrading from one plan to another) | ||
|
||
## Prerequisites | ||
|
||
Before you get started, make sure you follow the [Dub Conversions quickstart guide](/conversions/quickstart) to get Dub Conversions set up for your links: | ||
|
||
1. [Enable conversion tracking for your links](/conversions/quickstart#step-1%3A-enable-conversion-tracking-for-your-links) | ||
|
||
<ClientSideTrackingInstall /> | ||
|
||
## Client-side sale tracking | ||
|
||
<ClientSideSaleTracking /> | ||
|
||
<Warning> | ||
Client-side conversion tracking comes with some limitations: - **Ad | ||
blockers**: Users with ad blockers may prevent tracking scripts from loading - | ||
**JavaScript disabled**: Events won't be tracked if users have JavaScript | ||
disabled - **Network issues**: Failed network requests won't retry | ||
automatically - **Privacy concerns**: Some users may block client-side | ||
tracking for privacy reasons For more accurate conversion tracking, consider | ||
using [server-side conversion tracking](/api-reference/endpoint/track-sale). | ||
</Warning> | ||
|
||
## View conversion results | ||
|
||
And that's it – you're all set! You can now sit back, relax, and watch your conversion revenue grow. We provide 3 different views to help you understand your conversions: | ||
|
||
<ViewConversions /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion
2
...e/features/client-side-click-tracking.mdx → sdks/client-side/features/click-tracking.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Redirect for renamed click-tracking — add redirects for removed GTM lead/sale pages.
Consider adding redirects for removed GTM pages to prevent 404s; destination can be the GTM install guide (most intent-preserving).
If you prefer, we can instead point those to the new client-side lead/sale pages.
📝 Committable suggestion
🤖 Prompt for AI Agents