File tree Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 2424 </ script >
2525
2626 < script >
27- // Add a 3-second delay before loading the script to test queue functionality
28- setTimeout ( ( ) => {
29- const script = document . createElement ( 'script' ) ;
30- script . defer = true ;
31- script . src = './analytics/script.conversion-tracking.js' ;
32- script . setAttribute ( 'data-api-host' , 'http://api.localhost:8888' ) ;
33- script . setAttribute (
34- 'data-publishable-key' ,
35- 'dub_pk_BgyBCEJCPCGN3RN7oieLVHRs' ,
36- ) ;
37- document . head . appendChild ( script ) ;
38- } , 3000 ) ;
27+ const script = document . createElement ( 'script' ) ;
28+ script . defer = true ;
29+ script . src = 'https://dubcdn.com/analytics/script.conversion-tracking.js' ;
30+ script . setAttribute (
31+ 'data-publishable-key' ,
32+ 'dub_pk_xxxxxxxx' , // get your publishable key from https://app.dub.co/settings/analytics
33+ ) ;
34+ document . head . appendChild ( script ) ;
3935 </ script >
4036
4137 < header >
Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ export default function RootLayout({
3030 scriptProps = { {
3131 src : DUB_ANALYTICS_SCRIPT_URL ,
3232 } }
33+ // optional – only needed for client-side conversion tracking
34+ // get your publishable key from https://app.dub.co/settings/analytics
35+ publishableKey = "dub_pk_xxxxxxxx"
3336 />
3437 </ html >
3538 ) ;
You can’t perform that action at this time.
0 commit comments