how to do grouping of analytics data? - mobile

I am working on a Unity3D augmented reality app (iOS and Android) where I want to send AR campaign data to Google Analytics.
Example of what I exactly want to do
Information about AR campaigns available,
Category (can be anything...automobile, entertainment or travel), campaign name (each campaign is related to only one of the categories), user gender and age (available from login details).
I want the grouping of data on Google Analytics by,
category - data of all the campaigns grouped by each category
gender in a given category - data of how many males / females scanned a particular campaign, category wise
age in a given category - data of user's age who scanned a particular campaign, category wise
gender regardless of the category - data of how many males / females scanned a particular campaign irrespective of category
age regardless of the category - data of user's age who scanned a particular campaign irrespective of category
So as to generate and export reports for each of the above mentioned group.
I sent a couple of screens and events to GA but not sure how to group data as per my requirements and generate reports. I couldn't find any documentation of tutorial that describes a similar use-case. I am using the latest plugin from Google Analytics.
Any help is much appreciated.
Thanks!

Related

Solr Schema advice in multitenant ecommerce site

I have a multitenant site, whose products are indexed in Solr, so visitors can search by product name, or any other product property.
Now, I would like to filter by product price.
There are two problems:
Not all tentants have the same products on their website.
The product price can differ from one customer to another, as each tenant can change the price of each of the product it uses.
So given a tenantId, I'd like to search for all products that tenant has, which are in a given price range.
I don't think I can store a Map<CustomerId, Price> for each product and somehow query that, so I'm a bit stuck on how to design the schema. At the moment, I just have, for each product, a multivalued property called customer, so I can just filter by all products of a given tentant.
Any help appreciated, thanks!

Google appengine search api sort by ndb value

I am having a list of products. I have added to the google appengine search API index with each product being each document. User can search for products. So far everything is good.
Now I want the user to be able to sort by price of the product ascending or descending. If i have fixed price for each product, I could simply build separate indexes and put the documents inside them. But unfortunately, the prices are dynamic. The product price can change 3-4 times a day. I have more than 200,000 products.
Since rewriting the document each time the price changes is bad, I have a ndb datastore model which has the documentID and price as the entity attributes.
Is there any way to sort the search api results, based on the price in the ndb model. Alternate design solutions are also welcome.

Multiple datasources for one model in CakePHP

I have a very interesting problem in relation to CakePHP. I have a client that is currently selling products on eBay, and wants to start selling products on their own website as well. There would, then, be two separate sales avenues: (1) eBay, and (2) website.
However, they do want to have a seamless website experience for their customers. Basically, they want their current eBay sites to be categories within their current website, and their current eBay auction items to be searchable on their website.
A simple CakePHP website would have two tables: products and categories, with the simple table relation of "products belongsTo categories" and "categories hasMany products". How would I then add in the eBay categories and products? Basically, I want the http://site/products/index to return a list of ALL products, both in the products table and on eBay. I want http://site/categories/index to return a list of all defined categories in the categories table plus the categories items are listed in on eBay.
eBay has a very good pretty much real-time request query API, so I've been thinking about an option to do this, but am wondering if there is a better way... I don't think this option would work very well with PaginatorComponent...
Method:
(1) In beforeFind, capture the request parameters and save to a persistent variable
(2) In afterFind, make a request to the eBay API based on the request parameters, then manually add the results to the $results array.
Again, I think this would work for basic find operations, but I'm not sure this would work with pagination because I'm not sure how to deal with, say, a 20 item page limit (i.e. How do I deal with a page 2 when only 18 items from the database were on page 1, and now on page 2 I need to start at 19 instead of 21 from the database?)
Is there a CakePHP syntax that I'm overlooking here, or do I just start working on coding for all of these eventualities?
I'm coding on a CakePHP 2.6.0 platform.
Thanks so much for your help!
One possible approach would be to read all the products from each datasource, sort them in memory and paginate from there. The number of products would of course play a major role here.
A second one, if the number of products does not change too often, would involve a background process to retrieve their ID, and the most essential data, from eBay and write them in the common Product table, flagging the rows created.
Then Paginator can then show your results, but other fast-changing data can be retrieved on-the-fly from eBay for the flagged products while composing the page.

Solr customizing with Websphere Commerce

I have a strange requirement in Solr.
The business model is like for each store in state (say victoria), we have different sales catalog (like Richmond, Brunswick etc) which in turn act as fulfillment centers on their own.
so my url of storeId- vic and catalogId-Richmond will retrieve me catalogues with richmond's store.
Now the requirement is I need to filter out the products based on the inventory for each of these sales catalogues.
I constructed a TI table which has the following structure
catentry_id -------- QUANTITY_RICFUL-------------QUANTITY_BrunFUL
1234-------------------0------------------------------------20
I had incorporate the changes in solr query to add these columns in the final result too.
But I do not know how to filter out the products in the front end during catalogue navigation or during search.
Any help would be much appreciated!!!
So basically you want to tie the returned catalog entries in a list with inventory? For instance, when they click on a category you do not want to display products with no inventory?
This would be a customization you can either do at the Solr Level or at the JSP level. You should probably track inventory in commerce (import it) into a field Solr can key off of and then only return items with the flag set to greater than zero. I am not sure if you need actual inventory or just a boolean. Are you using a single fulfillment center or multiple ones? Multiple gets a bit trickier and it would require them to log in most likely but then fulfillment would be addressed by the ship to address.
If the store is set up with ATP inventory then you should just get this for free, as products not in stock will simply not be displayed. Check out this page in the infocenter - http://publib.boulder.ibm.com/infocenter/wchelp/v6r0m0/index.jsp?topic=%2Fcom.ibm.commerce.user.doc%2Fconcepts%2Fcosatpatpandnonatp.htm
I am not sure what you are trying to ask here but it seems you are trying to display a Quantity dropdown or display an Quantity field under each product on a search page which to me makes no sense from a UI perspective. Also keep in mind if you have integrated with a 3rd party inventory model that runs every few mins/hours etc. How often do you plan to run indexing etc?
I would rather leave such complexity to a Prodcut Detail page. If you do require to show an Quantity field on the search page I would rather prefer displaying a QuickView popup/modal that displays the color/size attributes with the quantity dropdown etc and enable a user to add an item to his/her shopping cart.

Database design suggestions for a configurable product eshop

I am building an e-shop that will have configurable products. The configurable parts will need to have different prices and stocks from the main product.
What database design would be best in this case?
I started with something like this.
Features
id
name
Features Options
id
id_feature
value
Products
id
name
price
Products Features
id
id_product
id_feature
value ( save the value from the feature-options for ease in search )
configurable (yes, no)
The problem is that now I am stuck on how to save the configurable product features.
I was thinking of saving their value as a json. But that will make saving price modification for a certain option difficult.
How would you go about this ?
Thank you.
Two more tables will do the magic (below). Hacks like JSON or parseable text fields can and should always be avoided.
-- one product <id_product> can have multiple
-- product variants <id> with different features enabled
product_variant
id
id_product (one product - many variants)
-- features, enabled for certain <id_product_variant>
product_variant_enabled_feature
id
id_product_variant (one variant - many features)
id_product_feature
unique_constraint(id_product_variant, id_product_feature)

Resources