Filter out specific Goal using analytics API in Excel - api

For one of my analytics properties I wish to filter out one specific goals. At the moment I'm using ga:goalCompletionsAll to get the goals. The goal I was to filter out is Goal 10. Is this even possible or is there a workaround without getting all the other goals apart from each other?
Cheers!

I though of a work around myself, I added the metric for goal 10 and made the formula like this 'AllGoals - Goal10'.

Related

How to supply data for search bar suggestions

Basically I'm working on my personal project, and I'm building a react native app that serves a very similar purpose to that of eBay's or Gumtree or the like. Users can obviously search for a product, I want to show search suggestions based on what the user types. Search engines usually show suggestions based on what is also being searched by other users, or what data is already is already posted on the site.
Since this is a personal project neither of those two cases apply. I need a way to still provide suggestions to user searches.
One way I tried doing this, is by finding a txt file with a bunch of product names and filtering through that based on user search.
I tried doing the same approach but by using an API instead of a text file.
I couldn't find any resources for either of those 2 methods, so I don't really know what to do
Any suggestions or references to material would be greatly appreciated!

Can I use Vue-analytics with a Measurement ID?

I've been looking for a way to easily integrate Google Analytics and Tag manager to a VueJS project I'm working on. I came across the solution of using a library called vue-analytics for this, but the tutorials I've seen always talk about setting it up with a Tracking ID, that looks like: UA-XXXXXX-X, which I don't have, I have a Measurement ID, that looks like: G-XXXXXXX.
So I was wondering if there's any difference with using either with Vue-analytics, and if there is, is it better that I get a Tracking ID or is there a way to set it up with a Measurement ID?
Thanks so much for any help!

How do I filter Batchpayments basis the InvoiceId?

I am able to verify InvoiceID for a particular Invoice in Batchpayment. Using following filter,
where=Payments[0].Invoice.InvoiceID==Guid("b55b2deb-8bd7-46b9-9965-2a20ed3ae555")
But, not able to filter throughout the array. Tried using following syntax,
where=Payments[*].Invoice.InvoiceID==Guid("b55b2deb-8bd7-46b9-9965-2a20ed3ae555")
This may be something you want to filter after the full response is delivered from the API. That may be easier than structuring the API call to filter only the desired results in this scenario.
How are you making these API calls?
What is your end goal? Get all payments for a specific invoice?
If you can include the SDK or a bit more about your use case I can try to help you figure out the best way to achieve your intended goals.

Retrieving Redmine issues via API for several projects and trackers

I would like to retrieve all Redmine issues that belong to a list of projects, and have either one of three trackers.
I was hoping to use query parameters project_id and tracker_id with multiple values. I tried tracker_id=3,1,5 and tracker_id=[1,3,5] as well as tracker_id=1&tracker_id=3&tracker_id=5 (and similar for project_id) but none of them will work.
The API page (http://www.redmine.org/projects/redmine/wiki/Rest_Issues) doesn't give any indication that it's possible. This might mean that I'd have to make a large number of API calls which may be hard to maintain ...
Any help or pointers are appreciated.
You need to use | instead of , character.
http://www.redmine.org/projects/redmine/issues.xml?tracker_id=1|2
source: https://github.com/redmine/redmine/blob/edbc9611de355e7933793b1eb155474d88d46fbd/app/models/query.rb#L621
It is not user friendly, but it should work if you try this:
/issues.json?set_filter=1&type=IssueQuery&f[]=tracker_id&op[tracker_id]=%3D&v[tracker_id][]=1&v[tracker_id][]=3&v[tracker_id][]=5

Identify item by either an ID or a slug in a RESTful API

I'm currently designing an API and I came a cross a little problem:
How should a URL of a RESTful API look like when you should be able to identify an item by either an ID or a slug?
I could think of three options:
GET /items/<id>
GET /items/<slug>
This requires that the slug and the ID are distinguishable, which is not necessarily given in this case. I can't think of a clean solution for this problem, except you do something like this:
GET /items/id/<id>
GET /items/slug/<slug>
This would work fine, however this is not the only place I want to identify items by either a slug or an ID and it would soon get very ugly when one wants to implement the same approach for the other actions. It's just not very extendable, which leads us to this approach:
GET /items?id=<id>
GET /items?slug=<slug>
This seems to be a good solution, but I don't know if it is what one would expect and thus it could lead to frustrating errors due to incorrect use. Also, it's not so easy - or let's say clean - to implement the routing for this one. However, it would be easily extendable and would look very similar to the method for getting multiple items:
GET /items?ids=<id:1>,<id:2>,<id:3>
GET /items?slugs=<slug:1>,<slug:2>,<slug:3>
But this has also a downside: What if someone wants to identify some of the items he want to fetch with IDs, but the others with a slug? Mixing these identifiers wouldn't be easy to achieve with this.
What is the best and most widely-accepted solution for these problems?
In general, what matters while designing such an API?
Of the three I prefer the third option, it's not uncommon to see that syntax; e.g. parts of Twitter's API allow that syntax:
https://dev.twitter.com/rest/reference/get/statuses/show/id
A fourth option is a hybrid approach, where you pick one (say, ID) as the typical access method for single items, but also allow queries based on the slug. E.g.:
GET /items/<id>
GET /items?slug=<slug>
GET /items?id=<id>
Your routing will obvious map /items/id to /items?id=
Extensible to multiple ids/slugs, but still meets the REST paradigm of matching URIs to the underlying data model.