Facebook marketplace track webpage changes - facebook

I want to find a way to track fb marketplace searches. I have tried using distill.io successfully on other sites but it fails with facebook.
I posed the question to distill support who told me facebook marketplace updates regularly and autogenerated selectors wont work and would have to hand coded.
I have tried looking at this but am not versed in css and cant see how I can go about manually doing this.
Is there another app or method for me to monitor the marketplace otherwise?
Thanks

Facebook will only refresh the marketplace page and filter by most recently posted if you change things like max and min price. This code opens random facebook links with carious prices for my desired price range category.
This only works if you add the numer that you have on your url when you sign in to market place. For example use:
'https://www.facebook.com/marketplace/xxxxxxxxxxxxxxx/vehicles?maxPrice=10000&sortBy=creation_time_descend&exact=false'
Then change the max and min prices in the url to random numbers near you desired range. You will need to manually refresh by clicking this button every few minutes.
My problem now is getting alerts through distill.io using a method like this that generates random links. Does anyone know how I could set up alerts based on the change in text for the most recently posted items?
<!DOCTYPE html>
<html>
<body>
<h1>Facebook Refresh</h1>
<p>Click the button to trigger random price change to allow facebook to refresh newest links</p>
<button onclick="randomSite()">Click me</button>
<p id="demo"></p>
<script>
var sites = [
'https://www.facebook.com/marketplace/vehicles?minPrice=100&maxPrice=9000&sortBy=creation_time_descend&exact=false',
'https://www.facebook.com/marketplace/vehicles?minPrice=200&maxPrice=8500&sortBy=creation_time_descend&exact=false',
'https://www.facebook.com/marketplace/vehicles?minPrice=200&maxPrice=8501&sortBy=creation_time_descend&exact=false',
'https://www.facebook.com/marketplace/vehicles?minPrice=240&maxPrice=8300&sortBy=creation_time_descend&exact=false',
'https://www.facebook.com/marketplace/vehicles?minPrice=203&maxPrice=9211&sortBy=creation_time_descend&exact=false',
'https://www.facebook.com/marketplace/vehicles?minPrice=204&maxPrice=8600&sortBy=creation_time_descend&exact=false',
'https://www.facebook.com/marketplace/vehicles?minPrice=1065&maxPrice=9000&sortBy=creation_time_descend&exact=false',
'https://www.facebook.com/marketplace/vehicles?minPrice=260&maxPrice=8500&sortBy=creation_time_descend&exact=false',
];
function randomSite() {
var i = parseInt(Math.random() * sites.length);
location.href = sites[i];
}
</script>
</body>
</html>

Related

Google+ share counts are not showing

I am using Google+ JavaScript API and currently my Google+ share counts are not showing on the website.
Note: I am using Google+ JavaScript API
This is the code I tried
<!-- Place this tag in your head or just before your close body tag. -->
<script src="apis.google.com/js/platform.js" ; async defer></script>
<!-- Place this tag where you want the share button to render. -->
<div class="g-plus" data-action="share" data-annotation="vertical-bubble" data-height="60">
</div>
They have been retired now so the share counts are no longer available.
Google may have done this to speed up the load time of the Google Plus buttons.
https://plus.google.com/110610523830483756510/posts/Z1FfzduveUo

A pop-up JavaScript code generated in my site without my knowledge

I have a website built with custom PHP. From last week when I click on any link to my site a pop-up opens itself. When I checked my code I found an unknown JavaScript code in header of my site like:
<script type="text/javascript">
var uid = '67478';
var wid = '124210';
</script>
<script type="text/javascript" src="http://cdn.popcash.net/pop.js"></script>
I removed this code but next day I rechecked, again same code in header. I again removed it but this comes back again and again.
What is this and how can I remove it permanently?
You have very serious issue, Some one is injecting that script and earning money of your site.
https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)
check your site against XSS injection

AddThis and History.js - automatic redirection to wrong URL

I have a problem with AddThis widget and History.js script.
Once user shares some page on Facebook using AddThis widget, some hashtag is appended to URL (e.g. #.U-S_Q-q0tE8.facebook).
Then, if user clicks such link on Facebook and goes to my website with URL e.g.: http://domain.com/path/to/content,123.html#.U-S_Q-q0tE8.facebook, they get redirected to http://domain.com/path/to/.U-S_Q-q0tE8.facebook which throws error 404.
The weird thing is that History.js is not even initialized or used. It's just embed on the site with <script...> tag.
Is there any solution to this? Is it possible to disable such behavior in History.js?
I have the exact same problem, and while I don't know if you can disable the history.js behavior, you can disable the addthis hashes by adding the following before the addthis script
<script type="text/javascript">
var addthis_config = {
data_track_clickback: false
}
</script>
This means you wont be able to track how many click that link gets using addthis, but something like Google Analytics is able to show traffic source.
Source

Is GA code needed when I use Google Tag Manager

I am trying to use Google Tag Manager and implement a custom dimension in a website. I use code igniter and need to get how many facebook, twitter and googleplus logins there are. I already inserted the dataLayer in the body above the GTM code but it seems the dataLayer.push isn't sending anything to GA. I am not seeing any pageviews or custom dimensions fired in GA. Is there anything else I need to do?
<body>
<script>
dataLayer = [];
</script>
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-XXXXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXX');</script>
<!-- End Google Tag Manager -->
<script>
dataLayer.push({'socialType': '<?php echo $adapter->id; ?>'});
</script>
Do I need to put the regular GA code or does GTM insert this for me?
From what you already have you also need to do the following:
Make sure that you have created a tag for Google Analytics in your tag manager account for page views, I assume that you have already done this.
Make sure that you have created another tag for Google Analytics, set the Analytics ID and then set the type of tag to Social.

Is it possible to put an iframe inside a Facebook page tab?

According to the Facebook developer roadmap, it will soon be possible to put iframes inside page tabs but it's not yet available. I came across this Store Locator on Coach page which uses an iframe to display a Google map inside a tab :
http://www.facebook.com/Coach?v=app_168904438199&ref=ts
Looking at the source code, I see the map really is inside an iframe. How is this possible?
in STATIC FBML pages you CAN'T USE IFRAMES - no matter what FBML code you put in there, facebook have specifically made the code not work in in business page/tab static fbml pages - my guess is so they can prevent people setting up Amazon stores or other content that uses IFrame (spammers and spyware often use iframes) - the updates are in their 2010 wiki - so it's probabley also a security thing.
I frames can still be used on developers canvas pages apparently but the customer has to click on an image for it to activate rather than the iframe automatically loading - again this is probably a security issue to prevent driveby downloads - where zwinky and similar toolbars are forced onto people computers in the background via iframes without their knowledge.
However some say it does work although you need a user to click on it before it works. if you can live with that then go for it.
<a onClick="outside_location.setInnerFBML(location_two);" style="cursor: pointer;"><center>→our website</center></a><div id="outside_location"> <fb:iframe width="730" height="400" frameborder="0" src="http://www.fborder.com/" /> </div>
<fb:js-string var="location_two"> <fb:iframe width="730" height="600" frameborder='0' src='http://www.fborder.com/' /> </fb:js-string> <script type="text/javascript" charset="utf-8"> var outside_location = document.getElementById('outside_location'); </script>
check out this post. people have got it to work. and some say it wont work for the obvious reasons. such as security and so on. but give it a go regardless.
http://www.facebook.com/topic.php?uid=4949752878&topic=7081
PK