amp-fx-flying-carpet. Can I use multiple amp-fx-flying-carpet on the same AMP page? - asynchronous-messaging-protocol

Is it possible to use more than one time the amp-fx-flying-carpet element on AMP pages? I'm using multiple times and I think it is affecting the display.

Related

How to create a pattern for multiple similar pages in Wordpress?

I am making a travel website and will therefore have to create several trip pages like this one : https://ready-japan.com/ninja-adventure/
I want to find a way to have a "pattern page" for all trips, where I would just fill out the trip info from the admin panel for each trip. That would not only help me make new pages more quickly, but also allow me to modify all pages at once if I need to, rather than having to change them one by one everytime I want to add a section.
I am using an up-to-date version of Wordpress.
I tried using various travel plugins, but it wasn't very satisfactory as I can't edit the page however I want.
I also thought of using templates, but I couldn't figure out how to make templates with parts that are editable from the admin panel.
To sum it up, I want to have a general pattern and trip info for each trip being modifiable independently.
I am open to whether using a plugin or meddling with the wordpress files (as long as it's not too technical).
Any help will be appreciated.
I would suggest a page builder like Elementor or Beaver. I, personally, use Elementor...
https://elementor.com/

Google Analytics Event track on page load

I'm trying to track pageviews on certain types of pages across multiple websites with different url structures (which rules out using a RegEx to segment a common section of the URLs). Is it possible to track page loads with an event script? Would it be used as an onLoad event?
You CAN utilize regex to accomplish this, though it does depend on how many rules you have.
Example if you want to include these two urls:
www.google.com/inventory/example
www.microsoft.com/vehicle/example2
you can use
.*(\/inventory\/|\/vehicle\/).*
Another option is to use Google Data Studio and create a calculated field based on the "page" dimension and filter/group using CASE function.

Web scraping of an eCommerce website using Google Chrome extension

I am trying to do web scraping of an eCommerce website and have looked for all major kind of possible solutions.The best I found out is web scraping extension of Google Chrome. I actually want to pull out all data available in the website.
For example, I am trying to scrape data of an eCommerce site www.bigbasket.com. Now while trying to create a site map , I am stuck to this part where I have to chose element from a page. Same page of say category A, while being scrolled down contains various products ,and one category page is further split as as page 1, page 2 and few categories have page 3 and so on as well.
Now if I am selecting multiple elements of same page say page 1 it's totally fine, but when I am trying to select element from page 2 or page 3, the scraper prompts with different type element section is disabled,and asks me to enable by selecting the checkbox, and after that I am able to select different elements. But when I run the site map and start scraping, scraper returns null values and data is not pulled out. I don't know how to overcome this problem so that I can draw a generalized site map and pull the data in one go.
To prevent web scraping various websites now use rendering by JavaScript. The website (bigbasket.com), you're using also uses JS for rendering info to various elements. To scrape websites like these you will need to use Selenium instead of traditional methods (like beautifulsoup in Java).
You will also have to check various legal aspects of this and whether the website wants you crawling this data.

Edit what displays in an iframe

I'm trying to display content from anther site on to mine using an iframe. I'm just wondering if its possible to only display certain parts (divs) of this external page in the iframe.
Thanks!
You could try and use some jQuery on your site to dynamically alter the styles of the external site. I did something similar with SSRS where we had an iframe containing SSRS reports which we wanted to style. We used jQuery in the master page to find the matching elements inside the frame target and alter them as required.
As long as the external site is well marked up (plenty of ids, good semantic structure) you may be able to hide/re-arrange elements as you require. You may also need to delay the jQuery execution as the frame contents may not be completely loaded by the time your JavaScript executes.
You can find a VERY simple example here.
BUT, be careful of the legalities involved with showing partial content from someone else's site. If you're presenting their site as your own or without identifying information, you could be infringing on their copyright.

asp.net web stats - google analytics

i want to add tracking to my website. I saw google analytics which seems to track what i need.
So do i stick the google analytics snippet in each page, in a master page, just in my default page? what is the best practice here to get the best metrics.
The google analytics code snippet has to be on every page you want to track.
Easiest is to put the code into the master page(s) if you use them.
Otherwise put it on every page, or put it into a user control which you can include on the relevant pages or include it using a server-side include, e.g:
<!-- #include file="file_containing_google_analytics_code.js" -->
It depends on the structure of your site. If you have a small number of Master Pages it makes sense in there, or you could put some code to emit it in a base class that you inherit all your pages (or master pages) from, or if you have a standard footer control that you use on all pages you can put it in there.
I generally wrap it in a Placeholder in ASP.Net and have some code the switches it on/off from a web.config setting so it doesn't appear when the site is running in test/UAT/dev machines.
We use Google Analytics, and have incorporated this into our base page - although our first implementation was done with an HttpModule.
I like the base page approach, because it is a common area for some like-minded tasks. It additionally moves the viewstate to the bottom of the form, removes whitespace, etc.
You should take a look here : http://blog.sb2.fr/post/2008/12/21/Google-Analytics-WebControl-for-ASPNET.aspx

Resources