How to preserve utm parameters in wordpress website without plugin - wordpress

My website is https://example.com/
When I run a campaign for example https://example.com/?utm_source=sourceexample&utm_medium=facebook
I want that when I navigate to any page the ?utm_source=sourceexample&utm_medium=facebook should also propagate in the URL. Currently when I navigate to any other page or click on a link the UTM parameters disappear from the URL.
I was expecting some piece of code to put in the function.php file which should fix this issue but unfortunately I could not find it.
Please help me to achieve it.

gravity from has this option inside the plugin.
will display on end page on what page they started.
also in google analytics.

Related

Link preview of facebook not working properly

I am facing an issue with facebook open graphs. This is the link of the website:
http://pandolin.com/
The problem is that when I share content from my website (for eg: this page http://pandolin.com/crafting-realism-on-celluloid-production-designers-subrata-and-amit/), the image and description of the post are not present in the link preview. I've attached the required screenshots.
The sharing debugger is giving the website
Response code 0
Server Id is empty
og:description is empty
og:image is empty
the scraper views an empty page instead of the page source
I've tried all the solutions available online. Please help find the bug and guide me by providing a step by step solution of the problem.
I saw that you're using Yoast plugin for your WordPress site. Maybe you can try the following:
Log-in into your WordPress CMS dashboard
Go to "Posts" and navigate to the desired post, as you would like to edit it
Scroll down to the bottom of your post, where you will see Yoast
settings
Click on the share icon in the Yoast settings, as shown in the image
below:
Upload your desired image to be shown in the FB share by default
That's it.

Google ads in Wordpress

I made a new theme in Wordpress before a year. And now i am updating as per requirement.
I have used Navayan Subscribe in this system. And i get Google ads in that place(frontend) and other place too(middle of the page). I don't know where are they coming from. As i have never used Google ads in clients website. You can check this page on the right hand side.
Thanks in advance.
It looks to me that the ads are coming from the widgets.
Go to Appearance > Widgets and check there.
If they are not there, check the code inside sidebar.php file by going to Appearance > Editor and open Sidebar.
You can also disable your plugins to see if some plugin is a cause the ads.
If still no luck then check other php pages for malicius code in the theme by looking for encrypted php code that looks like this:
eval(gzinflate(base64_decode('80jNycl...

get variable from a wordpress permalink

i have this wp page that display the preview of the products and once click it will send to the other page with full details of the product. Actually this worked on not pretty permalink but hopefully trying to make it search engine friendly
preview page:
http://localhost/phone/brand
full page:
http://localhost/phone/specs
sample link:
NOKIA-3210
Then specs/full page will get the "nokia-3210" string from the url to use in the wp query. but this redirect me to 404 page.
How can I go about fixing this? I've read that this can be fixed using .htaccess also rewrite_api, I'm lil confuse what to use. Any help to point me to the right direction?
I've never done this but I would guess some changes in the htaccess file would be required to force all visits onto the specs page itself and not treat nokia-3210 as a post/page.

Changing open graph image tag based on blog post item

I am maintaining a wordpress blog and am familiar with using the og:image meta tag to set the default image that is included when a like button is pressed. What I want to know is if there is a way to make this image dynamic based on the item liked.
I am trying to build it so that the first image in a particular blog post that is liked is what is pushed to the facebook feed post, with the blog's default image only used if there is no image in the post. Does facebook provide any way to do this with the graph api?
I tried writing javascript to change the meta tag on article pages (rather than the homepage) but found out later the crawler does not run javascript, so am now considering implementing the same but server side with PHP. This still would not solve the problem of Likes from the blog homepage, where there are multiple blog items on the page though. Any advice would be greatly appreciated.
Thanks
The only is changing how the meta tags get rendered to the client, in server code or in your layout template. There is no graph api method for this and you can't modify the tags with javascript as their scraper doesn't execute javascript.
Also, the scraper won't keep re-visiting your site so once it access it, it will be cached until you go to the url linter tool manually. so for the home page, you would probably just want the default image.

Google custom search results page don't show any results

I'm trying to use the google custom search in a wordpress website (but without any plugin).
I've used the code google provided (the search box code and the search results page code) and the results page it's returning empty...
However the auto-complete it's working:
This is the page that should show the results: http://www.guiasdeviagens.com/pesquisa/
Anyone could help me please? I've been trying for some days and can't fix the problem. :(
Thanks in advance.
By some chance did you turn on search engine blocking? Go to the admin dashboard and look at the top of the page for "Search Engines Blocked". If it's there, click on it and toggle the Site Visibility setting. Remember that once you are visible you still want to submit your URL to google. It also helps to have a sitemap.xml file to help the googlebot find all of your pages.

Resources