How to properly remove script i found that is causing 2 products to show in structured data - woocommerce - wordpress

We are having an issue where our structured data is showing 2 products instead of one on each product page. I located the script adding the extra info - however the script was found on each individual product page and we have loads of products for woo commerce. So like 1000+ pages. Is there a setting inside WordPress to remove this schema code?
I located the schema code searching our site files using Sublime. I could remove it but i feel like that would be the wrong way to do it? Since that same script is located on ALL our product pages. Is it a setting in wordpress? I am kind of lost.
This is the schema script I am trying to remove.
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "Organization",
"name": "vapesocietysupply",
"url": "https://vapesocietysupplies.com",
"logo": "https://cdn.vapesocietysupplies.com/wp-content/uploads/2016/11/vss-logo-sharp.png",
"contactPoint": [
{
"#type": "ContactPoint",
"telephone": "+1-888-978-8507",
"contactType": "customer service"
}
]
}
</script>
Thanks for any help in the right direction!
Structured data analysis: https://search.google.com/structured-data/testing-tool/u/0/#url=https%3A%2F%2Fvapesocietysupplies.com%2Fproducts%2Fglazed-donut-by-loaded-e-liquid-120ml%2F

Related

Structured Schema.org data is getting corrupted by Wordpress?

I added FAQ Schema on my Wordpress website. But somehow the code is getting corrupted when testing it using the schema.org testing tools. Weird thing is that it is showing in the page source code (checking in browser) correctly.
Example of FAQ schema.org code:
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": "FAQPage",
"mainEntity": [{
"#type": "Question",
"name": "Will plain text show correctly?",
"acceptedAnswer": {
"#type": "Answer",
"text": "Yea, plain text is showing up fine."
}
},{
"#type": "Question",
"name": "Why does this code not show correctly?",
"acceptedAnswer": {
"#type": "Answer",
"text": "But when adding <a href=https://google.com> links </a> or for example <strong>bold</strong> text there seems to be problems. Closing tags seems to dissappear somehow."
}
}]
}
</script>
Image: When testing the code in validator it is showing just fine
Image: Then I post the code on my Wordpress website. Classic editor. It shows fine when I check the page source code in browser
But then when I run the page URL in validator...
Image: I get this messed up code
Image: Which results in this
I'm struggeling with this issue for a while now, can't find anything about it. Your help would be much appreciated. Thanks.

LinkedIn Share API not showing image for URL some of the time

Our application lets an admin create a suggested social post for all of the members of his or her organization. The admin will insert a URL in our system and our platform creates a unique URL for each member. This is a link with a 302 redirect to the original link. It works similar to Bit.ly. When the member gets the suggested post he/she can create his/her own content for the post and url and approve for posting via the LinkedIn API. That all works perfectly.
As an example the share url could be https://example.com
Member one gets: https://yip.sh/1234
Member two gets: https://yip.sh/4321
Member three gets: https://yip.sh/4444
The PROBLEM: Some (a minority) of the member's posts do not share the meta image for the url. The majority of the social posts work and show a meta image so that tells me both the 302 redirect and the destination url are working correctly. I also have tried the urls from the post that do not work in the LinkedIn post inspector and the meta image shows up there.
My ASSUMPTION: Sometimes pulling the meta image takes a little longer than LinkedIn wants to wait and since each URL is unique it needs to check each time.
Possible SOLUTION: Automated ping of Linkedin post inspector to cache image before the share. This was what we did with Facebook when we had a similar problem. I have not found a way to do that though with LinkedIn.
Just to show the code we are using to share the post. But as I mentioned above this is working a majority of the time.
pass_the_hash = {
"author": "urn:li:person:#{#social_identity.uid}",
"lifecycleState": "PUBLISHED",
"specificContent": {
"com.linkedin.ugc.ShareContent": {
"shareCommentary": {
"text": "My Comment"
},
"shareMediaCategory": "ARTICLE",
"status" => "READY",
"originalUrl" => "https://yip.sh/1234"
}
},
"visibility": {
"com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
}
}
Has anyone seen a similar issue with LinkedIn Share API not showing meta image consistently? Or possibly know of a way to automate usage of the post inspector?
To quote LinkedIn...
After updating your website with perfect preview content and image, if you try sharing your website link you will still see old preview content and image. That's because LinkedIn caches link preview content for 7 days. Source: Official LinkedIn Documentation.
As you and they state, you can use the LinkedIn Post Inspector to refresh the cache. If you wanted to go the approach of pinging/curling LinkedIn, you can do...
https://www.linkedin.com/sharing/share-offsite/?url={yourlURL}
For instance, seems to work for getting info from the LinkedIn share API for GitHub.
Of course, you do also have the less-desirable option of waiting 7 days, although it is nice to know that it eventually works itself out by itself.
In the ugcPosts endpoint of LinkedIn shares API, there are some changes that are causing these issues. You will need to make changes to your code and add extra key for thumbnails like below:
{
"author": "'.$ownerURN.$page_id.'",
"lifecycleState": "PUBLISHED",
"specificContent": {
"com.linkedin.ugc.ShareContent": {
"shareCommentary": {
"text": "'.$text.'"
},
"shareMediaCategory": "ARTICLE",
"media": [
{
"status": "READY",
"description": {
"text": "'.$linkDescription.'"
},
"originalUrl": "'.$href.'",
"title": {
"text": "'.$linkTitle.'"
},
"thumbnails": [{
"url": "'.$imageHref.'"
}]
}
]
}
},
"visibility": {
"com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
}
}
I hope this is useful to people who are facing issues with the linkedIn Shares API now. I know this question is old but we faced this issue for a few days and the API documentation is not pointing out the issues.

Adding date filter In dashboard Metabase

I have Native query from My Google Analytics like this:
{
"ids": "ga:MY_GA_IDs",
"start-date": "2019-05-01",
"end-date": "2019-05-31",
"metrics": "ga:users,ga:newUsers,ga:sessions,ga:bounceRate,ga:pageviewsPerSession,ga:avgSessionDuration,ga:transactionsPerSession,ga:transactions,ga:transactionRevenue",
"dimensions": "ga:city",
"sort": "ga:city",
"filters": "ga:country=~(?i)indonesia",
"include-empty-rows": false,
"max-results": 10000
}
I try adding date filter for my dashboard using tag {{date_variable}} But it's not working. How can I adding dynamic date filter to my Dashboard?
For Metabase, on the dashboard page top right if you choose "Edit dashboard" like this -->:
Then choose "add filter" and link the filter to your {{example}} area in each table, it should work.
You will probably be better off the query builder when working with Analytics in metabase. The integration is not fully functional (check this and this issues for instance).
Check this post on metabase forum as a guidance (some other user had a very similar problem):
https://discourse.metabase.com/t/variables-in-google-analytics-native-query/4436

Schema.org clarification for JSON-LD representation and URIs

I'm trying to encode in JSON-LD the semantic information related to a website using Schema.org.
The web site is very basic: it contains the home page, a gallery page with a list of images and the image detail page.
Reading the different examples from the Schema.org website, and having a look also at the "get started" section, it is not so easy to understand which information have to be provided in each page.
To clarify the question, I can provide a snippet of code that I'm trying to create, by deducing the needed information after reading the Schema.org documentation.
Below the list of specific questions:
Does the information provided in the home page need to be repeated in all of the other pages? In this case, how the additional information shall be encoded (how to state that the page is a ImageGallery or ImageObject)?
How to match (in the image detail page) the image with a URI to semantically link the thing in the image to a real world thing (using for example a dbpedia.org/resource/URI)?
Example
HOME PAGE
{ "#context":"http://schema.org",
"#type":"WebSite",
"name":"Site name abc",
"alternateName":"ABC",
"description":"description",
"keywords":"keywords",
"inLanguage":"en",
"url":"http://www.thewebsiteurl.com",
"potentialAction":{
"#type":"SearchAction",
"target":"http://www.thewebsiteurl.com/find/{search_term_string}",
"query-input":"required name=search_term_string"
}
}
GALLERY PAGE
{ "#context":"http://schema.org",
"#type":"ImageGallery",
"description":"description",
"keywords":"keywords",
"associatedMedia":[
{
"#type":"ImageObject",
"contentUrl": "http://...../image1URL.jpg",
},
{
"#type":"ImageObject",
"contentUrl": "http://...../image2URL.jpg",
},
.....
]
}
IMAGE DETAIL PAGE
{
"#context": "http://schema.org",
"#type": "ImageObject",
"author":{
"#type": "Person",
"name":"abc"
},
"contentLocation":{
"#type": "Place",
"geo": {
"#type": "GeoCoordinates",
"latitude": "[latitude]",
"longitude": "[longitude]"
},
"name": "Place name"
},
"copyrightHolder":{
"#type": "Organization",
"email": "info#example.mail",
"url" : "http://www.thewebsiteurl.com"
},
"contentUrl": "http://...../image1URL.jpg",
"datePublished": "[date]",
"description": "description",
"keywords":"keywords",
"name": "Image name",
"exifData":[
{
"#type": "PropertyValue",
"name": "Exposure Time",
"value": "1/10 sec."
},
.....
]
}
Does the information provided in the home page need to be repeated in all of the other pages?
With the syntaxes Microdata and RDFa, you would typically mark up what is available on a page. While the syntax JSON-LD is different from them (because it’s not marking up, i.e., it’s decoupled from the existing markup), there is no reason to handle it differently.
If you have content about a certain image on the homepage, the gallery page, and the detail page, you may (and, in my opinion, should) provide structured data about it on each of these pages.
One reason for this is that consumers don’t necessarily parse your whole site:
A consumer might find a single page, look for structured data, and is gone again without looking for another page of your website.
A consumer might find a single page, look for structured data, is interested in more data and follows links specified in your structured data (e.g., URIs given as property values).
So ideally provide structured data (or reference structured data which is provided elsewhere on your site) wherever it’s relevant.
In this case, how the additional information shall be encoded (how to state that the page is a ImageGallery or ImageObject)?
It can make sense to differentiate between the type for the document (in the case of web page, WebPage or one of its subtypes) and the type(s) for the thing(s) described in this document.
So ImageGallery (which is a subtype of WebPage) represents the page, and ImageObject represents an image that could be part of this page.
If possible (but it often isn’t), you should provide properties that put all provided nodes in relation. For example with hasPart/isPartOf, mainEntity/mainEntityOfPage, or of course properties like author etc.
How to match (in the image detail page) the image with a URI to semantically link the thing in the image to a real world thing (using for example a dbpedia.org/resource/URI)?
Schema.org’s sameAs property could be used for this purpose. But you could of course also use properties from other vocabularies, like owl:sameAs.

How do I customize an HTML template before sending it in an email using Meteor and Mandrill?

I'm setting up an HTML template (not meteor template, but just a template written in HTML) and I need to plug in values for each donation received on our donation page. I will then submit that HTML file to Mandrill and it will send the file out to their email address. I don't know how to get started here. I just need a push in the right direction, or a resource to look for.
The question I have is, how do I add values into a static HTML file, then give that file to the Mandrill app without creating a new HTML file each time a receipt is sent and without changing the original file?
Thanks
Look like I just needed to paste in the merge tag fields that I want to use, then reference them when I do my API call.
http://help.mandrill.com/entries/21678522-How-do-I-use-merge-tags-to-add-dynamic-content-
So the template can have text like this, with the mergetag surrounded by *|...|*
Dear *|FNAME|*,
Then in the API call just tell Mandrill what fname should be replaced with.
```
"merge_vars": [
{
"rcpt": "emailadress#domain.com",
"vars": [
{
"name": "fname",
"content": "John"
},
```

Resources