i have a customer who is using Jimdo, he wants to sell his products via affiliate networks and he wants to share a 30% Commission based on the sales amount.
The affiliate network provided this pixel:
<iframe src="https://network.com/track?offer_id=123&amount={sale_amount}" height="1" width="1" frameborder="0" scrolling="no"></iframe>
I need to figure out how to pass the final conversion value from Jimdo back to the network.
Jimdo Problems:
Due to the HomePage kit, no individual thank you pages pages can be created. There is only one Page /orderconfirmation to add the pixel.
That's why I've been looking for a new solution and are currently trying to solve affiliate plans of my customer with the Google Tag Manager (GTM).
Now I we have new problems.
Typically, with Google Tag Manager you can detect different DataLayers that allow you to work with them. Unfortunately, Jimdo is not really transparent and GTM is not able to capture this DataLayer.
If you check their website structure with your browser, the are actually have all data points.
Module ID
List item
Data-product-id
Data-variant-id
Data-product-count
Data-product-item-id
Data-product-hash
Order_tracking_ID
If this cant be done, fine.
Then I just try to determine the code structure of the cart value.
picture
I need to know how to get sales amount value and pass it back to the affiliate network via Google Tag Manager.
Trigger should be the last button "buy now" before the thank you and on the thank you page the pixel should fire www.somejimdosite.com/orderconfirmation
Other ideas are welcome!
What javascript query could help to solve this problem? (Tag in GTM)
Can this help to get the data?
document.querySelector(".cc-checkout-number span").textContent
You don't even need custom javascript - the DOM type variables can be used to retrieve the text content of a CSS selector (will match the first one it finds, but I assume checkout number will occur only once on the page). You just need to set selection method to "CSS Selector" instead the default "Id". If you do not enter anything in "Attribute name" the variable will return the textContent.
And take care that you do not fire your tag on page load - the DOM needs to be there to be scraped, so DOM ready is the earliest moment you can use this
Related
I am trying to display on my webpage how many customer reviews there are, however the customer reviews are on another website.
So my idea was to target the DOM of that website and find out how many reviews there are by using .length, which returns me the correct value.
but I need to somehow link that .length value to my own website so that people who view it can see in text how many reviews there are. there will be a hyperlink below this to then direct the viewer to the other site to read them.
I want this because every time someone leaves an additional review on the other website the .length value will change and therefore need this to reflect automatically on my website.
Any ideas how this can be achieved?
I find myself having to interact with a web page that hides state in various places so that one cannot easily share it as a URL, for example this page which allows users to look up information from city zoning applications:
https://aca.cityofberkeley.info/community/Default.aspx
You can interact with the page all you want, but the URL in the location bar will remain the same as the above.
Currently, city staff provide users with instructions like "Load this URL, click on the 'Zoning' tab, enter DRCP2020-0010 under the 'Permit Number' field, click 'Search', then when the records come up, click 'Record Info' and then select 'Attachments' from the dropdown menu, then click on the PDF document that says '2020-10-21_DRCP_APP_PCKT_2801 Adeline.pdf'". I would like to be able to replace these instructions with a URL.
Another example is the website where video from city council meetings is archived:
http://berkeley.granicus.com/MediaPlayer.php?publish_id=cbebb4e6-5b83-11eb-920e-0050569183fa
It would be nice to be able to produce a link which brings up one of the meeting videos, and seeks to a certain timestamp like 53:40, so that I can refer to something specific that was said at a meeting.
Looking at the pages that are loaded when I follow the instructions in each case, I can see that there are some POST forms, cookies, hidden input fields, and so on.
Is there some kind of tool that I can use to create "deep links" to pages like these, that were generated using non-URL hidden state, which will allow me to quickly share what I'm looking at with another user?
What I'm seeking is similar to the frmget "bookmarklet", which changes the forms on a page to use GET instead of POST. Sometimes this succeeds in producing a URL which captures form submission query parameters. However, it doesn't work for these applications, for whatever reason.
This question is possibly related to the idea of capturing a web page's DOM state using "browser screenshots" and a script called html2canvas. A possible solution might involve getting and setting cookies in a bookmarklet. Ideally something that produces a normal "https://" URL would be ideal, but if it is impossible to solve the problem except by outputting a "javascript:" URL (bookmarklet) then that is acceptable to me (in spite of the security implications). Thanks.
That seems like not a programming matter. It seems like the site has some security issues as well.
QUESTION A: About Zoning
Here are some links you can use
Direct link to Zoning (I've found it via Advanced search from the site):
https://aca.cityofberkeley.info/CitizenAccess/Cap/CapHome.aspx?module=Planning&TabName=Planning&TabList=Home%7C0%7CBuilding%7C1%7CHousing%7C2%7CPlanning%7C3%7CFire%7C4%7CLicenses%7C5%7CPublicWorks%7C6%7CCurrentTabIndex%7C3
A strange link to the list of files (I've found it via downloading a file, then going to chrome://downloads, then right-clicking the file I've download. The link has been the following):
https://aca.cityofberkeley.info/CitizenAccess/FileUpload/AttachmentsList.aspx?iframeid=ctl00_PlaceHolderMain_attachmentEdit&module=Planning&isInConfirm=False&isdetail=True&isaccountmanager=False&isAdmin=True&isPeopleDocument=&agencyCode=BERKELEY&isForConditionDocument=N
It still doesn't give the direct link to the file, but it it gives the list of attachement of the previously opened Zoning record.
Currently I have no idea what file is triggered by javascipt:__doPostBack('attachmentList$gdvAttachmentList$ctl02$lnkFileName','').
In any case, based on what we have, step one, and then step two seems like minimize the path to download the file. I guess there could be a way to download the file directly, but I currently don't see any easy way. Maybe someone else could figure it out.
QUESTION B: About video
I've used an embed link that shows all the attributes that can be used.
There is a pretty strange but working way to give the exact timestamp. Change starttime from the link below:
https://berkeley.granicus.com/MediaPlayer.php?publish_id=cbebb4e6-5b83-11eb-920e-0050569183fa&starttime=0&stoptime=undefined&autostart=1
So replacing 0 for 3600 will rewind the video forward by one hour (3600 seconds):
https://berkeley.granicus.com/MediaPlayer.php?publish_id=cbebb4e6-5b83-11eb-920e-0050569183fa&starttime=3600&stoptime=undefined&autostart=1
The problem here is that ... you cannot rewind back manually that particular hour (it just gets kind cropped out). But it works to show the exact episode.
That's a pretty strange site.
To begin with, I'm fairly knowledgeable with both html5 and css3. Right now I'm trying to create a website that allows visitors to edit website content so that all visitors are able to see the edits. I know about contenteditable but this attribute does not last when the page is refreshed and no other visitors to see the edits. For example:
<p> Edit me please </p>
A visitor would be able to edit the element above by visiting the website and simply selecting and typing. Also I have heard that javascript, jquery, sql, and php can all allow visitors to edit website content but I don't know which is the best.
To sum up, if anyone knows how to allow visitors of a website to edit its' content it would be much appreciated to share their knowledge.
Create a database table (lets call it "strings") , and just define 2 columns - "string_identifier" and "string_value"
When you render the page, simply query the database to fetch the strings and their identifiers. Each editable element should have an attribute containing its identifier.
You can use jquery to capture the click event on all editable elements, and replace it with an input with that text.
Then assign an event handler to that input, so when the enter key is pressed, it sends a request to a php script (with the identifier and new string as data) on the server to update the database with the new string.
If you would like live updates to all other clients (no need to refresh), use jquery to continuously request a file on the server (endless loop), which will return a JSON object containing all the strings. Then go through and replace the text of all editable elements on the data with the new strings you have received from the server.
I haven't written any code for this yet as I am trying to figure out how to do it first. I have a site at work that I have to log into with a password. Its a site that we use to manage our lanes (I work in transportation currently) the information is displayed as a popup across several taps.
What I need to be able to do is pull the data off of a field on the last tab (its the field that shows total amount for our loads) the page is a .aspx page so is it possible to scrub this? Is there another method without getting the service involved? I am trying to do my own analysis program but really confused on where to start with retrieving the data.
any helpful hints or links are appreciated.
Try the Jquery load function that target and loads the returned HTML into your nominated result field. You also can target that specific field that you want.
$( "#result" ).load( "targetDomain/targetPage.html #targetField" );
I have a web site that displays a table of contents, and I'd like to use the Google Plus One button as a kind of persistent "favourite" marker. So a user would Plus One a page, and then in my table of contents I would show that page as being "Plus Oned" somehow (either bold the entry, show a plus image or something similar).
So is there any way to call the Plus One api to find out if a URL has been "Plus Oned" by the current user?
Note that I don't want to get the plus one count (as shown at http://www.tomanthony.co.uk/blog/google_plus_one_button_seo_count_api/) and I don't want to have to manually intercept plus one clicks and store the details myself.
http://www.tomanthony.co.uk/blog/google_plus_one_button_seo_count_api/ may do what I want. The isSetByViewer parameter that is returned is possibly what I want, but simply calling the web service as described in the web page always returns a isSetByViewer value of false. I would assume that some other undocumented data or cookie/header information would have to be sent to the web service identify the current user.
There is a pos.plusones.getSignupState in the hidden API, which you can try to experiment with instead of pos.plusones.get. Other than that, I think you should specify the G+ user id in the userID parameter.
Furthermore, you can try to sniff the network traffic for the +1 button with wireshark, webkit inspector and chrome://net-internals (watch SPDY traffic to client6.google.com). OR you could try to debug the js code with step to find what variable makes the +1 button highlight.