Activities from followed feed do not show up in following feed - getstream-io

I have an application with a combination of user feeds and one curated feed which is posted to by users we pick. All user feeds follow the curated feed. I can see in explorer that the follow relationships are set up and that activities are being posted in the curated feed, but the activities do not show up in the user feeds. What could cause this?

When you add activities using the add to many endpoint client.addToMany(activity, feeds) you are not going to get them propagated to followers.
This endpoint exists mainly to support use-cases where you want to publish the same activity to many feeds but do not want them to propagate via follow relationships (ie. think something like location based notifications).
For your needs you can add one activity to many feeds using the to targeting field:
feed.add_activity({..., to=other_feeds})
Please keep in mind that up to 100 feeds can be specified as targets.

Related

Sync two Shopify stores using API

I'm currently working on two Shopify stores but I want to synchronize the customer accounts between these two stores.
I saw in the Shopify dev doc that there is an API to retrieve all the customers and I managed to make it work.
My problem is how can I use the JSON data returned to update my 2nd store database?
It is very easy. I did it like this:
Download all the customers from the store you consider the source. Bulk download or using cursors, does not matter.
For each customer encountered, search the other store for the customer using the customer email for example. You either get back a record or you don't. If you do, you can update it, if you don't you can create it.
Unfortunately, as an exercise in programming there are 1001 ways to do this, and we have no idea what your skills or choices are there.

Bot and User Identification, channels Teams and Direct Line

I have a bot working on Teams and I'm able to fetch the user's Identity using the TeamsInfo. Now I want to get the same bot running on a web site (via direct line) albeit with lesser functionality and a different method of identifying the user.
I'm using TeamsActivityHandler as teams specific features (task module, messaging extensions) are being used.
As I want the flow to be different so I understand that I would need separate dialogs. I'm confused on how to approach this with activity handlers? Do I need separate activity handlers or lots of if conditions in one?
PS. I have looked for sample and articles online but didn't find anything about one bot running on multiple channels supporting different features; I can share some code if needed.

Difference between User Flows and Funnels features in Application Insights

Azure Application Insights has two different features called User Flows and Funnels.
The documentation states for User Flows:
The User Flows tool starts from an initial page view, custom event, or exception that you specify. Given this initial event, User Flows shows the events that happened before and afterward during user sessions. Lines of varying thicknesses show how many times each path was followed by users.
And for Funnels:
If your application involves multiple stages, you need to know if most customers are progressing through the entire process, or if they are ending the process at some point. The progression through a series of steps in a web application is known as a funnel. You can use Azure Application Insights Funnels to gain insights into your users and monitor step-by-step conversion rates.
Question:
Both features look similar especially if I see these statements even if they are different ones:
...how many times each path was followed by users...
...you need to know if most customers are progressing through the entire process, or if they are ending the process at some point...
Can they be used interchangeably once you would like to make a decision if there are any repetitive events by users like going through a process with exactly the same steps on a website?
Any clarification is appreciated, thanks!
I would say that both features have similarities, but they have differences as well. Whereas with the User Flows feature you are able to analyze individual user journeys on your website, with more granularity, using Funnels is meant to give you an aggregated vision of relevant metrics such as user conversion and user drop percentage, and in those cases understand in which step of the funnel the users are dropping, so then you can enhance your website to retain more users and avoid any drops. I would use funnel in scenarios that you have a specific workflow on your website that you want users to follow (e.g. form to collect data (reviews, specific information,etc.). The user flows is something that you can use in any website to understand the different user flows you have from your website visitors, so then maybe you can change to redirect users to other less visited sections of your website.

storing quick analytics using redis and node.js

I am new to redis and would like to store the web analytic of web site globally and per user activity .
Below is what i am stuck with.
// to get all unique ips
client.sadd('visitors',ip);
// to records hits per ip
client.hincrby('hits',ip,1);
The above so far works fine and i do get number of different ips and hit counter per ip.
the problem comes to store the activities made by each ip. i.e. Storing the link he clicked, searches he did, with datetime
Can some one please throw light on how to best manage it.
Thanks
the problem comes to store the activities made by each
You will need a separate structure for storing these.
The simplest rational structure is to have a "list of actions by session". Take a look at the sorted sets commands which provide a basic framework for creating a list of actions within a session.
This will get you something quickly. However, this is probably not what you really want. In fact redis is probably not useful for this at all.
If you want to re-trace an entire site visit you really want to connect to some sort of true analytics framework. There are dozens of website tracking tools that provide this type of functionality, so it's not really clear that building one is very efficient.

Expression Engine: When to use channels and when not to use them?

I am still a relative newcomer to Expression Engine as a developer and a user. I am faced with the problem that a lot of my knowledge is being passed to me by users who have found ways to accomplish tasks traditionally undertaken by developers (eg product libraries) by using the channels system.
What I wondered was what people's views are on when it is best to advise a client to use this and when not to.
Let me use an example, a client wants a system which had venues where events could take place. The previous developer had chosen to use the membership system for the venues and the channels system for the events and write some custom code to attempt to knit the two together, specifically because there are not enough hooks to accomplish some background automated tasks like looking up the long/lat of the address of a venue when it is created or updated.
I am picking up after someone else's work largely but its not their fault, it was the information they were given as they were also new to the system.
In any other project this would be a master-detail type setup, events belong to venues, i'd probably write 2 custom tables, editors in the admin area via modules and then use regular custom code in the pages to display and act upon the info - this way, I could control what's happening when a user hits submit.
However, the instigating party is a veteran user of Expression Engine and instructed the previous developer in the manner of "oh, just put it all in the channels and then there's this tag and that tag and so on".
So, am I missing the point or am I right that this does not fit the channels system and when should you use channels and when not?
Thanks friends.
This question is very hypothetical and every developer will give you a different answer as it all depends on the requirement and how that EE developer rolls.
Fundamentally ExpressionEngine allows you to approach builds in many ways, none are right and wrong, albeit some are easier, some harder, others just plain daft.
Basically Channels are groups of data "entries" - these can be anything. Using your example, venues could be one channel with fields created relevant to the subject (e.g. location, size, price, etc). And another channel for events with different fields (e.g. date, type, location).
Mostly anything can be slotted into a channel. But member details are best held within the native member functionality (although there is a commercial add-on that holds member data in a channel).
You reference the previous developers approach - this could be because they used a third-party add-on that required the data to be held separately to channels, or a lack of understanding on best approach. Or just because the developer decided to approach it that way! I suspect the last developer then associated a member (venue) to an entry (event) to link the event to the venue. Basic EE functionality allows for related entries which allows you to associate 1 entry with another (e.g. Event -> Venue), or using the excellent Playa add-on, so this approach is really not necessary.
Personally I would always store the data in channels, and people/members in the native membership functionality (e.g. admin, visitors to the site, customers, etc). I'd only build an add-on (utilising it's own tables/data) to store additional information if it was way outside what EE could store.
To answer your practical question (it's stretching the scope of what Stack Overflow questions are supposed be honestly): you should use a channel for Venues and channel for Events, and the Venue field in the Event entry is a "Related Entries" fieldtype linked to the Venues channel. That's the "standard" EE way, and the most similar to a traditional database schema.

Resources