Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
saadeghi committed Jun 27, 2024
1 parent 80db7a0 commit 6a4a735
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/docs/src/routes/(docs)/store/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ const copyText = (text) => {
</div>
<div class="flex flex-col items-center gap-3">
<a
href="{product.customattributes.ref ? `/store/checkout?product=${extractUUID(product.attributes.buy_now_url)}&ref=${product.customattributes.ref}` : product.attributes.buy_now_url}"
href="{product.customattributes.ref ? `/store/checkout?product=${extractUUID(product.attributes.buy_now_url)}&aff=${product.customattributes.ref}` : product.attributes.buy_now_url}"
class="btn btn-primary shadow-primary/50 group shrink-0 rounded-full shadow xl:px-10"
target="_blank"
rel="noopener noreferrer">
Expand Down
11 changes: 6 additions & 5 deletions src/docs/src/routes/(docs)/store/checkout/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
const urlParams = new URLSearchParams(window.location.search)
window.lemonSqueezyAffiliateConfig = {
store: "daisyui",
trackOnLoad: false,
onReady: (e) => {
e.Track(urlParams.get("ref"))
},
debug: true,
// trackOnLoad: false,
// onReady: (e) => {
// e.Track(urlParams.get("aff"))
// },
onTrack: (e) => {
window.location.href = `https://daisyui.lemonsqueezy.com/checkout/buy/${urlParams.get("product")}?aff_ref=${e.click}`
// window.location.href = `https://daisyui.lemonsqueezy.com/checkout/buy/${urlParams.get("product")}?aff_ref=${e.click}`
},
}
</script>
Expand Down

0 comments on commit 6a4a735

Please sign in to comment.