Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
dfd3f507
Unverified
Commit
dfd3f507
authored
Dec 11, 2023
by
Joel
Committed by
GitHub
Dec 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: ad block disabled tracking would block ga then can not pay (#1741)
parent
d5695b31
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
16 deletions
+3
-16
plan-item.tsx
web/app/components/billing/pricing/plan-item.tsx
+2
-12
index.tsx
web/app/components/billing/upgrade-btn/index.tsx
+1
-4
No files found.
web/app/components/billing/pricing/plan-item.tsx
View file @
dfd3f507
...
@@ -141,18 +141,8 @@ const PlanItem: FC<Props> = ({
...
@@ -141,18 +141,8 @@ const PlanItem: FC<Props> = ({
setLoading
(
true
)
setLoading
(
true
)
try
{
try
{
const
res
=
await
fetchSubscriptionUrls
(
plan
,
isYear
?
'year'
:
'month'
)
const
res
=
await
fetchSubscriptionUrls
(
plan
,
isYear
?
'year'
:
'month'
)
if
((
window
as
any
).
gtag
)
{
// Adb Block additional tracking block the gtag, so we need to redirect directly
(
window
as
any
).
gtag
(
'event'
,
'click_pay_btn'
,
{
window
.
location
.
href
=
res
.
url
plan
,
interval
:
isYear
?
'year'
:
'month'
,
event_callback
:
()
=>
{
window
.
location
.
href
=
res
.
url
},
})
}
else
{
window
.
location
.
href
=
res
.
url
}
}
}
finally
{
finally
{
setLoading
(
false
)
setLoading
(
false
)
...
...
web/app/components/billing/upgrade-btn/index.tsx
View file @
dfd3f507
...
@@ -51,15 +51,12 @@ const UpgradeBtn: FC<Props> = ({
...
@@ -51,15 +51,12 @@ const UpgradeBtn: FC<Props> = ({
(
setShowPricingModal
as
any
)()
(
setShowPricingModal
as
any
)()
}
}
const
onClick
=
()
=>
{
const
onClick
=
()
=>
{
handleClick
()
if
(
loc
&&
(
window
as
any
).
gtag
)
{
if
(
loc
&&
(
window
as
any
).
gtag
)
{
(
window
as
any
).
gtag
(
'event'
,
'click_upgrade_btn'
,
{
(
window
as
any
).
gtag
(
'event'
,
'click_upgrade_btn'
,
{
loc
,
loc
,
event_callback
:
handleClick
,
})
})
}
}
else
{
handleClick
()
}
}
}
if
(
isPlain
)
if
(
isPlain
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment