I am dealing with several custom conversions in facebook that we created.
However, using graph api I am only able to pull their id and not name.
Is there any way to get the name of the custom conversion?
I went into business manager id;
1231412345324?fields=link,id,name,adspixels{audiences{ads{insights{actions},tracking_specs,adlabels}}}
Can you try https://graph.facebook.com/v2.11/BUSINESSMANAGERID/owned_ad_accounts?fields=link,id,name,customconversions{name,id}&access_token=USERACCESSTOKEN
This will give you a list of your adaccounts in Business Manager and their custom conversion id and name.
Related
I had to create additional table in tenant user store to store some specific data. Now I need to fetch data from this table during authentication in authenticator. What possibilities do I have to make a sql query to this new table? I know I can create custom user store manager, but it looks like overengineering to me.
There are two ways that you can do this.
Write a custom authenticator
Write a custom user store manager
The above depends on the logic that you want to implement.
== Write a custom authenticator ==
Let's say you need to use these for username and password authentication. Then you can implement a custom authenticator by extending the existing authenticator. You can refer to this blog for more details.
== Writing a custom user store manager ==
You can easily extend the existing user store manager and overwrite the auth-related methods to suit your need. You will be able to find many documentation and medium articles related to this. I would like to recommend this approach since this is related to the user stores.
Also, you can see whether you can achieve this using the Pre-Post listeners (If possible then this would be the easiest approach). During the user store manager auth methods, UMs fire pre-authentication and post-authentication methods. If you add a new listener and subscribe that to any of those events you might be able to achieve this use case.
Can anyone provide me with working example how to show analytics (Visits, Page views, Page views per visit, etc) for logged users? As I understand there is no OOB solution, so I've tried to implement flexible dimensions, but didn't find any good examples and failed.
First of all you have to identify your logged in contact by calling the Sitecore.Analytics.Tracker.Current.Session.IdentifyAs() method, see more details here. When the contact logs in you can use their username to identify them upon the successful login.
Note, that the identification and authentication are separate unrelated events. Contacts are identified against the xDB and authenticated against the authentication mechanism used by the website.
When the contact identifies, it is saved to xConnect with a known identifier based on the information passed into theIdentifyAs() method: Identifier, Source and
IdentifierType will be set to ContactIdentifierType.Known (it is set to ContactIdentifierType.Anonymous for anonymous contacts). Then you can use IsKnown property on the Sitecore.XConnect.Contact that returns true if a contact has any known identifiers.
If you want to track some custom events for the logged in users to then use them for reporting needs you can add user interactions by calling the client.AddInteraction() extension method. I have given an example here.
If you want to extend the contact with your own custom data then you can create custom contact facets, read more here.
In order to implement your custom report with flexible filtering by logged in and not users, of course, you will need to define your custom dimensions and metrics, read more here.
I am trying to develop a role manager app in SPEAK where users can view the list of available roles and add/modify roles.
I know that we can get the list of current roles by using the API like this ,
Sitecore.Security.Accounts.RolesInRolesManager.GetUsersInRole(Role.FromName("Content Authors"), true);
How do I achieve this in SPEAK ? As there is no controller where I get the model properties and return it to view, how do I get to bind this list to the list page in SPEAK ? Or is there a better way of doing this?
Have a look at my following example SPEAK examples.
Here is a SPEAK list control with custom data binding. You can use this to display your data in the list you mention.
http://mikerobbins.co.uk/2015/03/30/sitecore-speak-list-component-custom-tile-and-knockout-databinding/
As for exposing the data you require, EntityService allows you to implement custom code and expose any data you wish from your custom controller. There is a JavaScript API allowing you to access the JSON data directly in your SPEAK PageCode.
http://mikerobbins.co.uk/2015/01/06/entityservice-sitecore-service-client/
I have also created some videos on this subject.
SPEAK List Control and Databinding: https://www.youtube.com/watch?v=ZKld8i7qX1A
Entity Service: https://www.youtube.com/watch?v=g0cVr6CnNKM
I am trying to retrieve my app campaigns and their associated apps with their events via my advertiser account.
The problem is that I am unable to find a unique identifier for my app in the API response.
For example the query below will get me the 'action_target_id'. This would either equal my AppId or another numeric string which I don't know what is. I am confused, does it mean I have two AppIds?
act_<AD_ACCOUNT_ID>/reportstats?time_interval={"day_start":{"day":"01","month":"03","year":"2014"},"day_stop":{"day":"07","month":"04","year":"2015"}}&data_columns=['adgroup_id', 'actions','action_target_id','action_target_name','campaign_name']&actions_group_by=['action_device','action_type']&format=json&async=true
What are 'action_target_id' and 'action_target_name' meant to represent (in the context of running a campaign for a mobile app)? I cannot seem to find a clear explanation for this in the API doc.
The applications/developer edge will return applications your account has access to.
As for your second question, the action_target_id and action_target_name are not always your application. It depends on what the action specs of each campaign is, if even set. An 'action spec' is a FB format for defining relationships between an ad and various objects for various purposes. More about that at https://developers.facebook.com/docs/marketing-api/intro-action-specs
In your case, the action spec in the context of a mobile app ad campaign will probably be the FB application. See also default conversion spec and default tracking spec.
I have a web service to retrieve the list of my users : /users
My User entity has a lot of attributes (with many relationship such as roles, address, etc) and it begins to be painful to retrieve the whole list.
I want to create a new web service to retrieve a list of a minimal User DTO. This DTO contains only the username, the first name and the last name.
What's your suggestions for this new URI ?
/users-minimal
/users/minimal
/users/func/get-minimal
... ?
If what's changing is merely the representation, you should make that available as a different media-type, not a different URI. For instance, if you have application/vnd.mycompany.user.v1+json for a normal user, you could use application/vnd.mycompany.user-minimal.v1+json for the minimal.
Now, you probably don't use custom media types like the above, and if you are asking about RESTful URIs, you're probably not using HATEOAS either. For those REST-like HTTP APIs, you should probably use a querystring parameter instead. Something like /users?minimal=1 or /users/?fields=username,first_name,last_name.