配置设置
前面的页面已经向您展示了如何使用最少的设置集成前端 JavaScript 库。以下是使用 Fast Track 前端 JavaScript 库时主配置对象可用的配置设置的完整列表。
可用的配置设置
名称 | 选项 / 类型 | 描述 | 默认值 | 必需 |
integrationVersion | 1.1 | 设置集成脚本的版本。 | 1.1 | 是 |
autoInit | Boolean | 当设置为 false 时,脚本不会自动初始化。必须通过运行 window.FasttrackCrm.init(); 手动初始化。 | false | 否 |
enableEventTracking | Boolean | 使 Fasttrack CRM 跟踪功能可用。 | false | 否 |
enablePendingRewards | Boolean | 使 Fasttrack CRM 待处理奖励功能可用。 | false | 否 |
enableCrmIntegration | Boolean | 使 Fasttrack CRM 功能可用。 | 1.0 版本中为 true,1.1 版本中为 false | 否 |
locale | String | 用于自动生成时间格式翻译的前端语言设置。 | 默认为浏览器/用户代理语言设置。如果未找到,默认为 enGB。 | |
inbox.enable | Boolean | 启用收件箱功能。仅适用于 1.1 版本及以上。 | false | 否 |
inbox.badgeId | String | 您 DOM 中 HTML 元素的 ID。将接收包含未读消息数量的文本。如果未读计数为零,元素将被隐藏。 | null | 否 |
inbox.navBarLogo | String | 应在收件箱左上角显示的图片(标志)的 URL。 | https://www.example.com/logo.png | 否 |
inbox.contactEmail | String | 用于支持目的的电子邮件地址。 | 否 | |
inbox.supportLink | String | 覆盖 inbox.contactEmail。期望使用 http / https 链接。 | | 否 |
inbox.supportLinkText | String | inbox.supportLink 的文本。 | | 否 |
inbox.supportLinkInNewTab | Boolean | 决定支持链接是在新标签页还是同一标签页中打开。 | false | 否 |
inbox.termsAboveButtons | Boolean | 将条款和条件放在推送和收件箱消息的 CTA 按钮上方。 | false | 否 |
inbox.closeModalOnFogClick | Boolean | 如果启用,当在覆盖层/雾区外点击时,您将能够关闭收件箱模态框。 | false | 否 |
pendingBonusesV2.enable | Boolean | 启用 FT CRM 集成的待处理奖金功能。 | false | |
pendingBonusesV2.badgeId | String | 您 DOM 中 HTML 元素的 ID。将接收包含未使用待处理奖金数量的文本。如果未读计数为零,元素将被隐藏。 | null | |
pendingBonusesV2.showTermsHeader | Boolean | 显示条款和条件部分的标题。 | false | |
pendingBonusesV2.closeModalOnFogClick | Bool | 如果启用,当在覆盖层/雾区外点击时,您将能够关闭待处理奖金模态框。 | false | |
pendingBonusesV2.depositPageUrl | String | 到您存款页面的相对页面链接。 | /deposit | |
可用的翻译设置
在 Fast Track 前端 JavaScript 库中,所有字符串都是可翻译的。翻译应该在 window.fasttrack.translations 中声明,在下面的列表中您可以找到所有可放在翻译对象中的可用翻译。
| 名称 | 默认值 |
|---|---|
recieved | Received: |
validUntil | Valid until: |
questionsTop | Questions? Mail us at |
questionsShort | Questions: |
deleteMessagePrompt | Are you sure you want to delete this message? |
inboxEmpty | There is currently no messages in your inbox |
readMore | Read more |
backToList | Back |
inboxHeader | Inbox |
pendingBonusesEmpty | You currently have no pending bonuses |
pendingBonusesTitle | Pending Bonuses |
pendingBonusesSubTitle | Grab these cool bonuses! |
pendingBonusesExpiresIn | Expires in |
pendingBonusesExpires | Expires |
pendingBonusesCTAUnlockText | Deposit! |
pendingBonusesCTAClaimFallbackText | Claim |
pendingBonusesBackButtonText | Back |
pendingBonusesTermsAndConditionsHeader | Terms & Conditions |
pendingBonusesBonusUnlockedText | Awesome! You can now claim this offer below |
days | d |
hours | h |
minutes | min |