Skip to content

Commit

Permalink
Merge pull request #721 from opentok/ECO-5915
Browse files Browse the repository at this point in the history
[ECO-5915] Config for icids
  • Loading branch information
Robert Hainer authored Nov 23, 2020
2 parents 252cfc6 + 2764775 commit bf18544
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ This repository contains a Node.js server and a web client application.
- [Feedback](#feedback)
- [Pre-call test](#pre-call-test)
- [Adobe Analytics](#adobe-analytics)
- [Icid tracking](#icid-tracking)
- [Additional configuration options](#additional-configuration-options)
* [Customizing the UI](#customizing-the-ui)
* [Troubleshooting](#troubleshooting)
Expand Down Expand Up @@ -565,6 +566,14 @@ To configure this, edit options in the config/config.json file or set environmen
(environment variable) -- The value that will be included in Adobe Analytics
object field: `digitalData.page.pageInfo.functionDept`. The default value is ''.

### Icid tracking

You can set your own icid querystring values on the thanks page urls through this setting

* `icid.startBuiliding` (config.json) / `START_BUILDING_ICID` (environment variable) -- icid for the "how to make this app better" and "start building for free" links. The default value is ''.

* `icid.contactUs` (config.json) / `CONTACT_US_ICID` (environment variable) -- icid for the "contact us" link. The default value is ''.

### Additional configuration options

* `appName` (config.json) / `APP_NAME` (environment variable) -- The name of the application
Expand Down
4 changes: 4 additions & 0 deletions config/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,9 @@
"primaryCategory": "",
"siteIdentifier": "",
"functionDept": ""
},
"icid": {
"startBuiliding": "",
"contactUs": ""
}
}
4 changes: 4 additions & 0 deletions server/serverConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,7 @@ E.ADOBE_TRACKING_SITE_IDENTIFIER = { envVar: 'ADOBE_TRACKING_SITE_IDENTIFIER', j
E.ADOBE_TRACKING_FUNCTION_DEPT = { envVar: 'ADOBE_TRACKING_FUNCTION_DEPT', jsonPath: 'adobeTracking.functionDept', defaultValue: '' };

E.ONE_TRUST_COOKIE_CONSENT_URL = { envVar: 'ONE_TRUST_COOKIE_CONSENT_URL', jsonPath: 'oneTrustCookieConsentUrl', defaultValue: '' };

E.START_BUILDING_ICID = { envVar: 'START_BUILDING_ICID', jsonPath: 'icid.startBuiliding', defaultValue: '' };

E.CONTACT_US_ICID = { envVar: 'CONTACT_US_ICID', jsonPath: 'icid.contactUs', defaultValue: '' };
10 changes: 10 additions & 0 deletions server/serverMethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ function ServerMethods(aLogLevel, aModules) {
const ATSiteIdentifier = config.get(C.ADOBE_TRACKING_SITE_IDENTIFIER);
const ATFunctionDept = config.get(C.ADOBE_TRACKING_FUNCTION_DEPT);

const startBuilidingIcidQueryString = config.get(C.START_BUILDING_ICID)
? `?icid=${config.get(C.START_BUILDING_ICID)}` : '';

const contactUsIcidQueryString = config.get(C.CONTACT_US_ICID)
? `?icid=${config.get(C.CONTACT_US_ICID)}` : '';

return {
otInstance,
precallOtInstance,
Expand Down Expand Up @@ -275,6 +281,8 @@ function ServerMethods(aLogLevel, aModules) {
helpLinkText2,
helpLinkUrl2,
oneTrustCookieConsentUrl,
startBuilidingIcidQueryString,
contactUsIcidQueryString,
};
});
}
Expand Down Expand Up @@ -330,6 +338,8 @@ function ServerMethods(aLogLevel, aModules) {
userCountry: country,
useGoogleFonts: aReq.tbConfig.useGoogleFonts,
appName: aReq.tbConfig.appName,
startBuilidingIcidQueryString: aReq.tbConfig.startBuilidingIcidQueryString,
contactUsIcidQueryString: aReq.tbConfig.contactUsIcidQueryString,
}, (err, html) => {
if (err) {
logger.error('getMeetingCompletion. error: ', err);
Expand Down
6 changes: 3 additions & 3 deletions views/endMeeting.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@
Check out the GitHub repo.
</a> </br></br>
Have a killer idea for how we can make this app even better?
<a href="https://tokbox.com/account/user/signup?icid=startbuidlingforfree_freeconferencing_tokboxfreetrialsignup_btn" target="_blank" rel="noopener"> Sign up for a Vonage Video API account</a> and start hacking today!
<a href="https://tokbox.com/account/user/signup<%= startBuilidingIcidQueryString %>" target="_blank" rel="noopener"> Sign up for a Vonage Video API account</a> and start hacking today!
</p>
<a class="btn" style="text-decoration: none;" href= "https://tokbox.com/account/user/signup?icid=startbuidlingforfree_freeconferencing_tokboxfreetrialsignup_btn" target="_blank" rel="noopener">Start Building for Free</a>
<a class="btn" style="text-decoration: none;" href= "https://tokbox.com/account/user/signup<%= startBuilidingIcidQueryString %>" target="_blank" rel="noopener">Start Building for Free</a>
</div>
<div class="endMeeting-box">
<h2>We’ve got you covered</h2>
<p>
Vonage can also help you with Unified Communications, like business phone and messaging systems, and Contact Centers with integration to Salesforce and other CRMs.
</p>
<a class="btn" style="text-decoration: none;" href="https://www.vonage.com/communications-apis/contact-api/?icid=contactus_freeconferencing_comm-apis_btn" target="_blank" rel="noopener">Contact Us</a>
<a class="btn" style="text-decoration: none;" href="https://www.vonage.com/communications-apis/contact-api/<%= contactUsIcidQueryString %>" target="_blank" rel="noopener">Contact Us</a>
</div>
</div>
<div class="back-to-top-wrapper">
Expand Down

0 comments on commit bf18544

Please sign in to comment.