FastComments.com

Add Comments to ThriveCart Learn+ Courses

ื‘ืืžืฆืขื•ืช FastComments ื ื•ื›ืœ ืœื”ื•ืกื™ืฃ ื‘ืงืœื•ืช ืชื’ื•ื‘ื•ืช ื‘ื–ืžืŸ ืืžืช ืœื›ืœ ืงื•ืจืก ThriveCart Learn+.

ืื ื™ืฉ ืœืš ื‘ืขื™ื•ืช ื‘ื”ื’ื“ืจื”, ืชืžื™ื›ืช FastComments ื™ื›ื•ืœื” ื’ื ืœืกืคืง ืกื™ื•ืข.

ืฉื™ื ืœื‘ ืฉืžื“ืจื™ืš ื–ื” ื“ื•ืจืฉ ื—ืฉื‘ื•ืŸ FastComments. ืžื•ืžืœืฅ ืœื”ื™ืจืฉื ืจืืฉื™ืช ื•ืื– ืœื—ื–ื•ืจ ืœื›ืืŸ. ื‘ืืคืฉืจื•ืชืš ืœื™ืฆื•ืจ ื—ืฉื‘ื•ืŸ ื›ืืŸ.

ืฉืœื‘ 1: ื”ื›ื ืช ื”ืงื•ืจืก Internal Link

ื‘ืฉืœ ื”ืขื™ืฆื•ื‘ ืฉืœ ThriveCart Learn+, ืขืœื™ื ื• ืœื”ื•ืกื™ืฃ ืืช ืงื•ื“ FastComments ืœื›ืœ ื“ืฃ ืงื•ืจืก ืฉื‘ื• ืื ื• ืจื•ืฆื™ื ืœื”ืฆื™ื’ ืชื’ื•ื‘ื•ืช.

ื ื™ืชืŸ ืœื”ืฉืชืžืฉ ื‘ืื•ืชื• ืงื˜ืข ืงื•ื“ ื‘ื›ืœ ื“ืฃ, ื•ืฉืจืฉื•ืจื™ ืชื’ื•ื‘ื•ืช ื ืคืจื“ื™ื ื™ืงื•ืฉืจื• ืื•ื˜ื•ืžื˜ื™ืช ืœื›ืœ ื“ืฃ ื‘ื ืคืจื“.

ื ืชื—ื™ืœ ื‘ืคืชื™ื—ืช ื”ืงื•ืจืก ื‘ืขืจื™ื›ื” ื•ื”ื•ืกืคืช ื‘ืœื•ืง HTML.

ืžืžืฉ ื‘ืฆื“ ืฉืžืืœ ืืžื•ืจ ืœื”ื•ืคื™ืข ืืคืฉืจื•ืช ื‘ืœื•ืง HTML. ื’ืจื•ืจ ืื•ืชื• ืืœ ืžืงื•ื ื‘ื“ืฃ ืฉื‘ื• ื‘ืจืฆื•ื ืš ืœื”ืฆื™ื’ ืชื’ื•ื‘ื•ืช.

ืคืชื— ืืช ื”ืงื•ืจืก ื•ื”ื•ืกืฃ ื‘ืœื•ืง HTML
ืคืชื— ืืช ื”ืงื•ืจืก ื•ื”ื•ืกืฃ ื‘ืœื•ืง HTML

ื›ืขืช ื‘ื—ืจ ืืช ื”ืืœืžื ื˜ ื”ื—ื“ืฉ ืฉืœ ื”โ€‘HTML. ื‘ืœื•ืง ื™ื•ืคื™ืข ื‘ืฆื“ ื”ืฉืžืืœื™ ืฉื‘ื• ื ื•ื›ืœ ืœื”ื“ื‘ื™ืง ืืช ื”ืงื•ื“ ืฉืœื ื•.

ื›ืขืช ื ื™ืชืŸ ืœื”ืžืฉื™ืš ืœืฉืœื‘ 2.

ืฉืœื‘ 2: ื”ื•ืกืคืช ืงื•ื“ ืžื•ืชืื ืื™ืฉื™ืช Internal Link

For Step 2 we have to copy our code snippet. Check that line 50 does not say "demo" - you'll want to ensure this has your tenant id. It should be populated for you.

ืขื›ืฉื™ื• ื ืขืชื™ืง ืืช ืงื˜ืข ื”ืงื•ื“ ืฉืœ FastComments ื”ืกืคืฆื™ืคื™ ืœ-ThriveCart-Learn.

ื”ื•ื ื“ื™ ื’ื“ื•ืœ, ื›ื™ ื”ืื™ื ื˜ื’ืจืฆื™ื” ืขื ThriveCart ื›ื•ืœืœืช ื”ืจื‘ื” ืชื›ื•ื ื•ืช, ืื– ืคืฉื•ื˜ ืœื—ืฆื• ืขืœ ื›ืคืชื•ืจ ื”-Copy ื‘ืคื™ื ื” ื”ื™ืžื ื™ืช ื”ืขืœื™ื•ื ื” ืฉืœ ืงื˜ืข ื”ืงื•ื“:

ืงื•ื“ ืชื’ื•ื‘ื•ืช ThriveCart Learn+
Copy Copy
1
2<script src="https://cdn.fastcomments.com/js/embed-v2.min.js"></script>
3<div id="fastcomments-widget"></div>
4<script>
5 (function () {
6 let attemptsRemaining = 10;
7
8 function tryLoad() {
9 const simpleSSO = {optedInNotifications: true, optedInSubscriptionNotifications: true};
10 let isAuthenticated = false;
11 let profileLink = document.querySelector('.thrivecart-courses-header-profile-link');
12 if (!profileLink) {
13 profileLink = document.querySelector('.thrivecart-courses-header-profile'); // ื”ืžื—ืœืงื” ืฉื•ื ื” ื‘ืžืฆื‘ ืชืฆื•ื’ื” ืžืงื“ื™ืžื”.
14 }
15 // broad email input field selector incase ThriveCart changes id.
16 // ื‘ื•ื—ืจ ืฉื“ื” ืื™ืžื™ื™ืœ ืจื—ื‘ ื‘ืžืงืจื” ืฉ-ThriveCart ื™ืฉื ื” ืืช ื”-id.
17 const emailInputField = document.querySelector('input[type=email]');
18 if (emailInputField && emailInputField.value) {
19 isAuthenticated = true;
20 simpleSSO.email = emailInputField.value;
21 } else if (profileLink && !profileLink.innerText.includes('John Smith')) { // allow preview to work - no email available.
22 attemptsRemaining--;
23 if (!attemptsRemaining) {
24 return console.error('Could not load FastComments - could not determine user information (email). Please reach out to FastComments support.');
25 }
26 console.warn('FastComments: No user email found - waiting and trying again.');
27 return setTimeout(tryLoad, attemptsRemaining < 5 ? 3000 : 100); // increase wait time after 5 attempts incase slow internet.
28 }
29 if (profileLink) {
30 // use raw "img" query incase ThriveCart changes image class selector.
31 // ื”ืฉืชืžืฉ ื‘ืฉืื™ืœืชืช 'img' ื™ืฉื™ืจื” ื‘ืžืงืจื” ืฉ-ThriveCart ืชืฉื ื” ืืช ื”ืกืœืงื˜ื•ืจ ืฉืœ ืžื—ืœืงืช ื”ืชืžื•ื ื”.
32 const avatarImg = profileLink.querySelector('img');
33 if (avatarImg && avatarImg.src) {
34 isAuthenticated = true;
35 simpleSSO.avatar = avatarImg.src;
36 }
37 // use innerText incase ThriveCart changes how profile name is displayed.
38 // ื”ืฉืชืžืฉ ื‘-innerText ื‘ืžืงืจื” ืฉ-ThriveCart ืชืฉื ื” ืืช ืื•ืคืŸ ื”ืฆื’ืช ืฉื ื”ืคืจื•ืคื™ืœ.
39 if (profileLink.innerText) {
40 isAuthenticated = true;
41 simpleSSO.username = profileLink.innerText;
42 } else {
43 const bold = profileLink.querySelector('b');
44 if (bold && bold.innerText) {
45 isAuthenticated = true;
46 simpleSSO.username = bold.innerText;
47 }
48 }
49 } else {
50 if (!attemptsRemaining) {
51 return console.error('Could not load FastComments - could not determine user information (user name/avatar). Please reach out to FastComments support.');
52 }
53 console.warn('FastComments: No user profile info found - waiting and trying again.');
54 attemptsRemaining--;
55 return setTimeout(tryLoad, attemptsRemaining < 5 ? 3000 : 100); // increase wait time after 5 attempts incase slow internet.
56 }
57
58 let url;
59 const selectedNavLink = document.querySelector('.tcc-browse-lesson.active a');
60
61 if (selectedNavLink) {
62 // sometimes TC uses multiple links the same page, so let's de-dupe them.
63 // ืœืคืขืžื™ื TC ืžืฉืชืžืฉืช ื‘ื›ืžื” ืงื™ืฉื•ืจื™ื ืœืื•ืชื” ืขืžื•ื“, ืื– ื ื•ืกื™ืฃ ื”ืกืจื” ืฉืœ ื›ืคื™ืœื•ื™ื•ืช.
64 url = getPathnameFromUrl(selectedNavLink.href);
65 } else {
66 // trim marketing parameters and domain name
67 // ื—ืชื•ืš ืคืจืžื˜ืจื™ื ืฉื™ื•ื•ืงื™ื™ื ื•ืฉื ื“ื•ืžื™ื™ืŸ
68 url = window.location.pathname;
69 }
70
71 if (url) {
72 url = url.replace('/starte-hier', '');
73 url = url.replace('/start-here', '');
74 }
75
76 FastCommentsUI(document.getElementById('fastcomments-widget'), {
77 tenantId: 'demo',
78 urlId: url,
79 simpleSSO: isAuthenticated ? simpleSSO : null
80 });
81 }
82
83 tryLoad();
84
85 function getPathnameFromUrl(url) {
86 try {
87 const parsedUrl = new URL(url);
88 // trim marketing parameters and domain name
89 // ื—ืชื•ืš ืคืจืžื˜ืจื™ื ืฉื™ื•ื•ืงื™ื™ื ื•ืฉื ื“ื•ืžื™ื™ืŸ
90 return parsedUrl.pathname;
91 } catch (error) {
92 console.error("Invalid URL", url, error);
93 return window.location.pathname; // default to current, so at least it works sometimes
94 }
95 }
96
97 })();
98</script>
99

Now paste it into the code block on the left in the ThriveCart editor. It should look like this:

ืงื•ื“ ื ื•ืกืฃ
ืงื•ื“ ื ื•ืกืฃ

That's it! Now we just have to publish:

ืคืจืกื•ื
ืคืจืกื•ื

ื–ื”ื•! ืขื›ืฉื™ื• ืืžื•ืจ ืœื”ื•ืคื™ืข ืชื™ื‘ืช ื”ืชื’ื•ื‘ื•ืช ื‘ืงื•ืจืก ืฉืœืš ื›ืืฉืจ ืชืฆื™ื’ ืชืฆื•ื’ื” ืžืงื“ื™ืžื”, ื•ืžืฉืชืžืฉื™ื ืืžื™ืชื™ื™ื ื™ื•ื›ืœื• ืœื”ืฉืื™ืจ ืชื’ื•ื‘ื•ืช ื‘ืœื™ ืœื”ืชื—ื‘ืจ ืื• ืœื”ื–ื™ืŸ ืžื—ื“ืฉ ืืช ืฉื ื”ืžืฉืชืžืฉ/ื”ืื™ืžื™ื™ืœ ืฉืœื”ื.

ื”ืขืจืช ื‘ื“ื™ืงื”!

If you have anonymous commenting disabled, which it is by default, you won't be able to leave comments in Preview mode as the John Smith user. You will get an authentication error as the default John Smith user has no email. If you want to test, we suggest you use a coupon code and go through your site like an actual user.

ื”ืฆืœื—ื” Internal Link


ื”ืฆืœื—ื”! ื›ืขืช ืืžื•ืจ ืœื”ื•ืคื™ืข ื•ื•ื™ื“ื’'ื˜ ื”ืชื’ื•ื‘ื•ืช ืฉืœ FastComments.

ื”ืฆืœื—ื”!
Success!

ื‘ืจื›ื•ืช ืขืœ ื”ื’ื“ืจืช FastComments ืขื ThriveCart! ืื ื ืชืงืœืช ื‘- Domain Error, ืื• ืื ื‘ืจืฆื•ื ืš ืœืœืžื•ื“ ื›ื™ืฆื“ ืœื”ืชืื™ื ืื™ืฉื™ืช ืืช ืื–ื•ืจ ื”ืชื’ื•ื‘ื•ืช, ื”ืžืฉืš ืœืงืจื•ื!


ื”ืชืืžื” ืื™ืฉื™ืช Internal Link


FastComments ืžืขื•ืฆื‘ืช ื›ืš ืฉืชืชืื™ื ืœืืชืจ ืฉืœืš.

ืื ื‘ืจืฆื•ื ืš ืœื”ื•ืกื™ืฃ ืขื™ืฆื•ื‘ ืžื•ืชืื ืื™ืฉื™ืช, ืื• ืœื›ื•ื•ื ืŸ ืืช ื”ื”ื’ื“ืจื•ืช, ืขื™ื™ืŸ ื‘ืชื™ืขื•ื“ ื”ื”ืชืืžื•ืช ื•ื”ื”ื’ื“ืจื•ืช ืฉืœื ื• ื›ื“ื™ ืœืœืžื•ื“ ื›ื™ืฆื“.