Skip to content

Commit a581290

Browse files
Update
1 parent 71f0c03 commit a581290

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed
Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: zendesk
22
title: Zendesk
3-
organization: d8f63b60-89ae-11e7-8574-5927d48c4877
3+
organization: gitbook
44
visibility: public
55
description: ''
66
summary: |
@@ -10,22 +10,10 @@ categories:
1010
- analytics
1111
script: src/index.tsx
1212
scopes:
13-
- space:script:inject
1413
- site:script:inject
15-
blocks:
16-
- id: zendesk
17-
title: Zendesk
18-
description: My GitBook Integration
14+
- site:script:cookies
1915
secrets: {}
2016
configurations:
21-
space:
22-
properties:
23-
site_tag:
24-
type: string
25-
title: Zendesk Site ID
26-
description: Site Tag from Zendesk
27-
required:
28-
- site_tag
2917
site:
3018
properties:
3119
site_tag:
@@ -34,3 +22,4 @@ configurations:
3422
description: Site Tag from Zendesk
3523
required:
3624
- site_tag
25+
target: site

integrations/zendesk/src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type ZendeskRuntimeContext = RuntimeContext<
1111
RuntimeEnvironment<
1212
{},
1313
{
14-
site_tag: string;
14+
site_tag?: string;
1515
}
1616
>
1717
>;
@@ -26,7 +26,7 @@ export const handleFetchEvent: FetchPublishScriptEventCallback = async (
2626
return
2727
}
2828

29-
return new Response(script.replace('<TO_REPLACE>', trackingId), {
29+
return new Response((script as string).replace('<TO_REPLACE>', trackingId), {
3030
headers: {
3131
'Content-Type': 'application/javascript',
3232
'Cache-Control': 'max-age=604800',

0 commit comments

Comments
 (0)