Skip to content

Commit e1c1432

Browse files
authored
feat: Remove smartlook and add intercom messenger (#1175)
- Remove Smartlook as we no longer use it - Adding Intercom messenger script to allow AI chat - added a new variable to the Intercom for this
1 parent 848f424 commit e1c1432

File tree

8 files changed

+18
-16
lines changed

8 files changed

+18
-16
lines changed

.github/workflows/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ jobs:
1313
- run: gh workflow run deploy.yaml --repo apify/apify-docs-private
1414
env:
1515
GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
16-
SMARTLOOK_PROJECT_KEY: ${{ secrets.SMARTLOOK_PROJECT_KEY }}
16+
INTERCOM_APP_ID: ${{ secrets.INTERCOM_APP_ID }}

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
env:
3737
APIFY_SIGNING_TOKEN: ${{ secrets.APIFY_SIGNING_TOKEN }}
3838
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39-
SMARTLOOK_PROJECT_KEY: ${{ secrets.SMARTLOOK_PROJECT_KEY }}
39+
INTERCOM_APP_ID: ${{ secrets.INTERCOM_APP_ID }}
4040

4141
- name: Set up GitHub Pages
4242
uses: actions/configure-pages@v5

.github/workflows/lychee.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
env:
3030
APIFY_SIGNING_TOKEN: ${{ secrets.APIFY_SIGNING_TOKEN }}
3131
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
32-
SMARTLOOK_PROJECT_KEY: ${{ secrets.SMARTLOOK_PROJECT_KEY }}
32+
INTERCOM_APP_ID: ${{ secrets.INTERCOM_APP_ID }}
3333

3434
- name: Run Lychee Link Checker
3535
id: lychee

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
- run: npm run build
3232
env:
33-
SMARTLOOK_PROJECT_KEY: ${{ secrets.SMARTLOOK_PROJECT_KEY }}
33+
INTERCOM_APP_ID: ${{ secrets.INTERCOM_APP_ID }}
3434

3535
lint_content:
3636
name: Lint markdown content

apify-docs-theme/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"axios": "^1.7.4",
2626
"babel-loader": "^9.1.3",
2727
"docusaurus-gtm-plugin": "^0.0.2",
28-
"docusaurus-plugin-smartlook": "^1.0.2",
2928
"postcss-preset-env": "^9.3.0",
3029
"prism-react-renderer": "^2.0.6"
3130
},

apify-docs-theme/src/config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ const themeConfig = ({
1313
hideable: true,
1414
},
1515
},
16-
smartlook: { projectKey: process.env.SMARTLOOK_PROJECT_KEY || '-' },
1716
navbar: {
1817
title: 'Apify Docs',
1918
logo: {
@@ -266,7 +265,6 @@ const themeConfig = ({
266265
});
267266

268267
const plugins = [
269-
'docusaurus-plugin-smartlook',
270268
[
271269
'docusaurus-gtm-plugin',
272270
{

docusaurus.config.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,19 @@ module.exports = {
3333
sizes: 'any',
3434
},
3535
},
36-
],
36+
// Intercom messenger
37+
process.env.INTERCOM_APP_ID && {
38+
tagName: 'script',
39+
innerHTML: `window.intercomSettings={api_base:"https://api-iam.intercom.io",app_id:"${process.env.INTERCOM_APP_ID}"};`,
40+
attributes: {},
41+
},
42+
// Intercom messenger
43+
process.env.INTERCOM_APP_ID && {
44+
tagName: 'script',
45+
innerHTML: `(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',w.intercomSettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Intercom=i;var l=function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/${process.env.INTERCOM_APP_ID}';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);};if(document.readyState==='complete'){l();}else if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()`,
46+
attributes: {},
47+
},
48+
].filter(Boolean),
3749

3850
onBrokenLinks:
3951
/** @type {import('@docusaurus/types').ReportingSeverity} */ ('throw'),

package-lock.json

Lines changed: 1 addition & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)