Installing disqus on blog question

Highlighted
Excursionist
35 1 8

I want to replace Shopify's article comments with discus. Disqus gives you code to copy to your theme. There are two variables that they ask we change to Shopify language.

 

The first is PAGE_URL:

this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable

After Googling, I think that would be {{ canonical_url }}.

But maybe it should be {{ blog.url }}?

 

The second is PAGE_IDENTIFIER:

this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable

I can't figure out what PAGE_IDENTIFIER should be.

Any idea?

0 Likes
Highlighted
New Member
3 0 0

I've got the same question!

For what it's worth, I think you're right about the canonical bit.

I'm going with page.id for the second bit.

0 Likes
Highlighted
Excursionist
35 1 8

How did you come to page.id? You know, utilizing these variables are only to prevent issues down the road. Even if you put a wrong value, Disqus should still work and you would still be in danger of running into issues in the future. But you wouldn't know that now. I'd rather be 100% sure about this. I'll ask the Disqus support. 

0 Likes
Highlighted
Tourist
8 0 3

Hello Rocking,

Did you manage to get an answer to your answer?

I am in the same boat as you were. I would like to know what values did you put for those to variables.

TIA

Regards,

V

0 Likes
Highlighted
Excursionist
35 1 8

No, never got an answer, so I'm not using discuss for now.

0 Likes
Highlighted
Tourist
8 0 3

I looked through the docs and found article.id is unique, so that's what I am using. It is working fine so far.

 
var disqus_config = function () {
this.page.url = {{ canonical_url | prepend: "'" | append: "'" }};  // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = {{ article.id }}; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
 
0 Likes