Phonegap geotriggers

46 views
Skip to first unread message

Alex

unread,
Dec 22, 2015, 3:11:30 PM12/22/15
to plot-users
Hello!

Great service - enjoying playing with it

Could you please add some clarity to how geotriggers work on Phonegap/Cordova - on iOS and Android - if they do

The chart of capabilities suggests geotriggers work but geogrigger handler doesn't. But where does the geotrigger call?

Second question - can we run code on the notification handler and blank the notification at that point, creating a pseudo geotrigger?

Thanks!

Alex



a...@plotprojects.com

unread,
Dec 24, 2015, 4:28:35 AM12/24/15
to plot-users
Hi Alex,

The geotrigger handler does not work for PhoneGap; however, it does work for the native versions. In PhoneGap, the geotrigger basically collects the total triggers and these are then shown in the dashboard. Your idea of using the notification handler to blank out the notification would not work either, since the notification is shown first and the notification handler is triggered after that.

Kind regards,
Ali Ameer

Alex

unread,
Dec 24, 2015, 4:54:46 AM12/24/15
to plot-users
Hello Ali

Thank you for your reply

Could you explain this in more detail? "In PhoneGap, the geotrigger basically collects the total triggers and these are then shown in the dashboard". What do you mean by collects? 

I am still intrigued why there is a tick on the features table for Phonegap and geotriggers - so presumably something works? 

Very best wishes
Alex

a...@plotprojects.com

unread,
Dec 24, 2015, 5:15:14 AM12/24/15
to plot-users
Hi Alex,

Since the geotrigger handler is not supported for PhoneGap, the geotriggers serve as a means to collect trigger related data such as the total geotriggers handled, and this data is then shown in the dashboard under the "Analytics" section.

To reiterate the point, geotriggers are supported for PhoneGap; however, the geotrigger handler is not, and this is reflected in the features table too.

Kind regards,
Ali Ameer

Alex

unread,
Dec 24, 2015, 5:23:10 AM12/24/15
to plot-users
Hello Ali

I understand the geogrigger HANDLER is not supported for phonegap, however I am not clear on how therefore you mean with this "geotriggers serve as a means to collect trigger related data such as the total geotriggers handled"

i.e. your explanation alludes that some kind of geotrigger runs on phonegap as data is being collected, just we don't have a specific handler. 

Context - what I am trying to do is run some code when someone enters a geographic region (to set in our local db that they have been to that region) - but without sending them a notification. I don't mind if this code runs on every geotrigger, as I can work around that. 

Thanks for your help!

best wishes
Alex

Mark van der Tol

unread,
Dec 24, 2015, 5:39:01 AM12/24/15
to plot-users
Hi Alex,

When no geotrigger handler is defined, it will just count the number of times a geotrigger has been triggered. This will show in the "Geotriggers handled" column in our dashboard. You could for example use this to see how often a notification will trigger when you would place a notification at a certain location, without actually sending the notification.

The problem is that running javascript in the background isn't possible for Phonegap. It is possible to implement the Geotrigger Handler using native code, even when using Phonegap. Would that work for you?

What is the use case you need this functionality for? Maybe you could use a different feature instead. Since our latest plugin version we support segmenting on earlier geotrigger triggers. Is that what you need? We can also provide detailed analytics for geotriggers as part of the "Detailed analytics" feature.

Best wishes,
Mark van der Tol
Plot Projects

Alex

unread,
Dec 24, 2015, 6:23:19 AM12/24/15
to plot-users
Hello Mark

Thank you for helping.

I see - yes - I could I guess work on a native code plugin - not sure how that would trigger - but I see theoretically how it could be done.

Context - thousands of users in one city. Divide the city into 10 circles (no overlap). Store when they have been to each circle. Then I know where APPROXIMATELY they have been - and won't suggest an area (e.g. via marketing) if they have already been there. 

If there was a way - afterwards (e.g. daily) - to get who had been to each geotrigger - (i.e. in statistics API) - then that would do it (however currently I think the analytics are just summaries, not detailed to that level). i.e. a list of user IDs. (and some way we know which this user ID is, on the phone - i.e. an ability to get to that user ID) . 

Or I guess I could setup, using segmentation, one geotrigger PER user - but with thousands of users, there would be a lot of geotriggers so not sure that would do it. 

Very best wishes
Alex

Alex

unread,
Dec 24, 2015, 8:19:54 AM12/24/15
to plot-users
Actually, thinking about this more

Its geofences that you count for an account purpose yes?

So say I have 10 regions of a city I am tracking, for 2000 users

I create

10 geofences
2000 users x 10 geotriggers = 20,000 geotriggers

All I would need to do is look at the stats for each geotrigger - and because I know the segmentation - I would know that an individual user had been in a certain geotrigger area, that day, which is good enough for my purposes. 

Any reason that won't work? Key question is does the segmentation help - so if I were 1 user - with a segmentation value of my user ID (i.e this geotrigger was just for me), then I would only be managing the subset of geotriggers (10) on a device - not the 20,000 ? 

i.e this would still work if somehow we went to 50,000 users (!)  

Alex

Mark van der Tol

unread,
Dec 24, 2015, 8:51:48 AM12/24/15
to plot-...@googlegroups.com
Hi Alex,

We indeed count geofences and beacons for billing, not the number of notifications or triggers.

I wouldn't recommend creating a geotrigger for every of your users, since we currently don't provide an easy means to retrieve statistics for many geotriggers at once. The statistics api routes also have a lower rate limit then the other routes.

It would be possible to retrieve geotrigger/userId information via the "Detailed analytics" feature part of the Gold plan, including api access then. We can then together work out how the output should look. If you want to go this way, I would recommend contacting us through the dashboard. You can find the contact button in the bottom right after you've logged in. Or you could contact us through our website: http://www.plotprojects.com/contact/

Kind regards,
Mark van der Tol
Plot Projects

Alex

unread,
Dec 24, 2015, 9:33:21 AM12/24/15
to plot-users
Thanks Mark

Quick q - what is the API rate limit? (for statistics API routes)

Might work it out with how I described above, as that works today without you having to make an adjustment, then move to your approach (for scale) if the proof of concept works at a low data volume level

Thanks!

best wishes
Alex

Mark van der Tol

unread,
Dec 27, 2015, 9:07:44 AM12/27/15
to plot-users
Hi,

The limit is currently around 100 requests per day. To speed up your requests I would recommend setting the startDate query parameter to just a few days ago.

Kind regards,
Mark van der Tol
Plot Projects

Alex

unread,
Dec 27, 2015, 10:04:06 AM12/27/15
to plot-users
HI Mark

If 100 is the API request limit then we are going to have to look at the other approach, sooner rather than later :) 

If we are setting up say 1000 geotriggers, and want to check for yesterday's statistics (1000 API calls), my approach only really works during beta testing phase, not scale roll out phase, if we want the statistics to calculate overnight for yesterday rather than say on a month delay basis. 

So, back to the development request :) 

- To be able to see, on a geotrigger, list of Plot Projects user ids of who triggered it (in the API call response)
- In the included PlotProjects code on the device, to be able to read the Plot Projects user ID, so can cross reference that back with the geotrigger statistics API response

BONUS - would be great to know the TIME that a geotrigger happened, in addition to the date, by Plot Projects user ID, in the geotrigger statistics API call response.

Alternative dev request - increase the statistics API limit ;)

Thanks! 

Alex

Mark van der Tol

unread,
Jan 5, 2016, 11:28:16 AM1/5/16
to plot-users
Hi Alex,

We will provide an api in the future that allows to retrieve statistics for multiple (geotrigger) campaigns in one call. I cannot give an exact estimate when this feature will be ready, but it should become available in the near future.

Other information, such as what user triggered a geotrigger and what time it was triggered is available via the Detailed Analytics feature.

Kind regards,
Mark van der Tol
Plot Projects
Reply all
Reply to author
Forward
0 new messages