Tracking Interactive PDF Clicks - pdf

I came across a curious question today, asked by my boss. Is it possible to track the clicks to pages inside an interactive PDF without it being embedded in a web page?
The client wants the user to download a PDF from his/her website and track what pages the user is clicking on inside the downloaded PDF.
After searching around on google for a while all I kept getting was links to pages telling you how to track PDF downloads.
Anyone who can shed some light on this or offer me a definitive yes or no to this question would be greatly appreciated.

The Javascript for Acrobat API Reference makes note of this event (page 368 of the API reference):
Page/Open
4.05
This event occurs whenever a new page is viewed by the user and after page
drawing for the page has occurred.
The target for this event is the Doc.
This event does not listen to the rc return code.
This would imply to me that you can hook this event and (assuming the end user permits the communication) send info to your web server every time they change pages.
Obviously this is limited to when the user is reading in Acrobat (Reader or Professional); it will not work if they are reading directly in Chrome or Firefox. And to re-emphasize, Acrobat will prompt the user to ask if it is allowed to communicate with an external website. If the user denies it, no tracking.

As it has already been stated, the PageOpen event would be the hook for tracking pages. But as this works only for (Acrobat) JavaScript enabled viewers, which at that moment have an internet connection available, those stats would be suboptimal.
We also have to point out that this kind of tracking is highly questionable from the point of view privacy (in Europe, this may even be illegal).
A little bit less questionable could be to chop up the document into single pages, add navigation links, and then use the server stats.

Related

Anchor.click using executeJs function not working in real iPhone safari browser

I have a question regarding executeJs function.
page.executeJs("$0.click();", downloadAnchor.getElement());
This line of code is not working in real iPhone Safari browser, though it works in mobile responsive mode from desktop safari. Appreciate your help on this
Browsers will be "suspicious" of anything starting a download that isn't a direct reaction to interaction by the user. This is done as a security precaution since starting to download files without the user's explicit consent can be dangerous in specific cases. Different browsers and configurations have different policies for exactly where to draw the line.
In your case, the download isn't started as a direct consequence of user interaction but instead as direct consequence of receiving a message from the server. This kind of pattern will simply not work reliably no matter what you do.
Instead, you need to design the interaction so that the download is directly triggered by the user. The easiest way of doing that is by having the user directly click on the actual download link. If you want to have some indirection, then you still need to make the action work directly in the browser without going through the server.

Posting status on google plus business page in vb.net

I want to post a message on google plus business page. Is there any way to do this.
I am confused between interactive post, app activities and moment.
Should I use Moment to post on business page?
I go through google api site documents, but not getting any solutions.
Please let me know if there is any other way to post in google plus page.
It depends on exactly what you mean by "post" and by a "business page".
I'm assuming that the "business page" is one that is not associated with a Google App account. If you're meaning something that will show up on your stream, and that people who have you in a circle will see your post - there is no public API from Google that will do what you want. You need to work with one of their partners, such as HootSuite, to automatically share messages to your stream.
Interactive posts are ways that a visitor to your website can be prompted to share something from your site to their stream on Google+. These interactive posts include both a link to your site as well as an additional "call to action" button to an individual item from your site. It does not automate posts, although it can make some parts of it easier.
App activities and moments are the same thing. They are meant to record actions that take place on your website on Google+, but they do not directly share anything into your stream. Instead, they create an event in your Google+ profile that can be seen only by those you permit it to - you can then, if you wish, share that event to your stream. So while the moment can be generated automatically, it still requires manual action to share it.
Finally, if you have a page that is associated with a Google App account, you can create posts automatically, but those posts are limited in scope. They are only visible to, at most, other people in the same App Domain as the account. This is useful for using Google+ as a communication tool inside an organization, but not useful for communicating with customers, for example.

Google Plus Interactive Posts not displayed on any stream (Client side API)

As the title denotes, looking for insight on reasons why an Interactive Post doesn't show up on any stream (user sharing the post, and to whomever the user is sharing it with).
Brief
Implement client side api of G+ interactive posts
This seems successful
application auth is requested and if granted is displayed in user's "applications list"
intended content, prefill text, etc. are all displayed when the trigger to initiate the share is invoked
no error indicators (that I know of) are displayed when the "Share" button is clicked by the user (the act of actually posting the share).
it is visible in some way only to Google - explained below
Findings
It seems Google is blocking the post because even though the share isn't posted on any stream (origin nor target), I received a warning about violating Google policies as displayed below, indicating that the (http) post was sent/submitted...
further inspection of network activity also displays what looks like (a guess on my part) a spam score (of 8), somehow already pre-determined (another guess on my part):
https://apis.google.com/u/0/_/sharebox/post/?spam=8&hl=en&ozv=...
Questions
Primary question is why would interactive posts not appear on stream? Any debugging tool out there?
IF my guess on spam blocking is accurate, then why would such be the case? For interactive posts (which somehow inherently is a case of some user "promoting" something in the first place) - eg: with a "BUY" calltoactionlabel?
IF my other guess on the content being "pre-tagged" as spam, how/why would that occur. I didn't include it above, but it is a "product page" - the idea of it, which isn't new nor revolutionary, is to give the opportunity for a user to "share" an item he/she just purchased, say in a normal checkout flow?
It's my assumption that implementation was done correctly, no errors reported, etc. - or perhaps it wasn't? Though it seems unlikely, it's "grasping at straws" time..
Further testing/debugging seems unwise given the warning of policy violation - and yes, I've stopped further dev on this to prevent harming my accounts (one personal, one work, both used above for testing this API).
Thanks for any assistance/input.
Note: I've posted this on G+ community (no luck so far) so once this is resolved I'll share the answer there too (or vice versa).
It looks like you are posting the Interactive post from http://localhost or from any private domain url. Google crawler can only allow interactive post from public domain.
As from their website -
Important: Interactive posts will not work when PhotoHunt is hosted at http://localhost:8888 because the Google crawler can only access public URLs to get microdata about the content of the post. In the case of PhotoHunt for Java, you can deploy your app to appspot.com as a public Google App Engine app.

Sharing on Google+ with big image (photo sharing, perhaps)?

I'm currently working on a Google Hangouts app that, among other things, features posting links to certain pages on the user's Google+ page.
Because the shared content is mainly a visual thing (dynamically generated images, to be precise), I have been looking at ways of having the post
on user's stream display a big, full-width picture, essentially an effect similar to one visible here (disclaimer: I do not endorse the company linked in any way, it was simply one of the first examples I have found of the look).
Now, I've read through Google+ documentation on Share Button and Snippets about ways to have sharing from a single click and customisation of the content that comes with the link, but visually, the attached thumbnail is somewhat smaller than what I'd find ideal for the task (as visible ).
The example of a big picture display was tied to the photo sharing functionality, so I've looked at Google+ API, to see if there's a way to automate it, but as stated on the API docs landing page, "The Google+ API currently provides read-only access to public data.". No ability to pursue the goal through the official channels then.
Next step, GitHub. There are some sites for which the wrappers around their internal communication have been written, thus creating sort of unofficial API, so I tried my luck there. Among various libraries, I have found one that was not a wrapper around an official API, google-plus-extension-jsapi, but being written for the context of Chrome extensions rather than webpages, I couldn't get it to work, mainly due to usage of WebSQL and cross-domain XMLHTTPRequests.
Without any further leads, I ask the community thus - is there any way for a webpage app to provide the user with the ability to share a full-width picture on their Google+ stream or am I limited to standard sharing thumbnails?
I will confirm, you can not do what you're trying to do using the Google+ API because there is no stream write API and you do not have control over how shares will render.
As you have already determined, you can not write posts, such as a picture, directly to a user's stream, without the user's interaction (e.g. share). For branded pages, there is the Pages API, but it is currently not public and would be restricted to Pages as opposed to People/Profiles.
You can generate a share link to an external image and then if the user clicks it, the image can appear in their stream. As you noticed, the image will be a small thumbnail as opposed to a full-bleed photo and will render as a share - undesirable if you want the image to fill the whole stream area.

Tracking through PDF

I am exporting a document as a PDF. It is kept on a publicly accessibly website so that any users can download and read it. Now I want to track this. e.g. "How many times the PDF got opened."
Note that my question is not to track while I download, we need to track when the PDF is opened. Is there any kind of script that is invoked when the PDF is opened so that Adobe Acrobat Reader sends the details to my server?
These are the details I would like:
IP
Date/Time
Possbilly GEO Location.
Yes, you can probably do this. PDF includes a Javascript API, which some (but not all) PDF readers implement. I'm only certain of Acrobat and Foxit Reader doing this, and it can be turned off in both, for security and privacy reasons. That said, it's probably your best shot.
I glanced through the Javascript for Acrobat API Reference, and it looks like you could register for the "Page/Open" event (page 368 in my copy), and on receiving the first one of those, make a Net.HTTP call (page 548) to a web server you're running. That will get you the date/time and the public IP of the client reading the document, from which you can get a geolocation using a service like GeoIP.
I'm not sure this is possible. Although PDF can execute Javascript, reader software is naturally paranoid about malware being embedded in "benign" documents, so the execution context is quite restricted, with warnings shown about possible dangerous activity.
See previous SO question Can my PDF ping my server when it is opened?