I have read through
https://sitecore-community.github.io/docs/xDB/the-xdb-contact/ and https://doc.sitecore.net/sitecore_experience_platform/81/setting_up__maintaining/xdb/contacts/contact_tracking.
I would like to know whether Sitecore contact tracking will work for my client or not.
I have created a simple newsletter subscription functionality (without WFFM form submission). Once a user submits his information along with personal details and email, I send a confirmation email link. After confirming the email address, I am creating contacts through code. Thanks to Brian!
My application session state mode is InProc.
My question is, if user is interacting with the site with a new session after subscription (after submitting email):
Will Sitecore identify user as contact (and merge in existing anonymous contact) or will it create new anonymous contact each time?
I am NOT using any of the following services in my solution:
Device detection
GeoIp Service
FXM
Your approach
It seems to me that manually creating contacts is completely unnecessary in your case.
As I understand from your post, here's what happens:
A user visits your website.
Sitecore creates a new contact (ID: xxx).
The user browses the website and submits your form.
A confirmation email is sent to the user's email address.
The user clicks on the link in the email and hits a confirmation page on the site.
Your code creates a new contact in xDB (ID: yyy).
As a result, you have two separate contacts in xDB that are not related to each other, from Sitecore's perspective.
Now, to your question:
Will Sitecore identify user as contact (and merge in existing anonymous contact) or will it create new anonymous contact each time?
If the user is visiting from the same browser, Sitecore will recognize them as the original contact (ID: xxx) based on a cookie. Sitecore will not create a new contact in this case.
If the user is visiting from another browser or device, he will not be recognized as any of the existing contacts and a new anonymous contact will be created (ID: zzz).
As you can see, Sitecore has no way of automatically using the contact you created (ID: yyy).
Suggested solution
The only way to make Sitecore recognize a user as a specific contact is to use the identification API. In short, what you can do is this:
Sitecore.Analytics.Tracker.Current.Session.Identify(identifier);
Here's what I suggest you to do:
Do not create new contacts manually—there's just no need for that.
When the user has submitted the form, you invoke Identify() and pass the user's email address as the identifier. This will set the user's email address as the identifier of the current contact.
When the user comes back from the email link you sent, you invoke Identify() once again. This will make sure that, even if the user is coming from another device, the same xDB contact will be used in his session. You'll need to pass the same email address to Identify(), so make sure you have access to it—for example, you can include it in your email confirmation link as a query string parameter.
Use Sitecore.Analytics.Tracker.Current.Contact and populate the current contact's facets with the information you've collected about the user.
If you have a login functionality, remember to invoke Identify() on successful login attempts—again, this is to ensure that the same contact is used for all sessions of the same user.
Related
So I'm working on this django web app and I want to create a contact me form for my client. My client wants the users of his website to be able to send him emails directly from the form available on the platform. But my client uses a free yahoo email address.
I'm kind of confused of where to begin. But here is my suggested approach see if you can give me an advice:
1- create a form in the forms.py with the different fields of the form.
2 - link the form to the template.
3- create the view for the contact form.
4- add the path in the url pattern.
I read an article that says I need to go through an email service like SendGrid to actually send an email. But it said that I need a professional account to be able to do it.
I really appreciate your attention.
Your way to go looks good.
You do not need any sending service, as long as you have a proper SMTP account to use for sending.
Just add the SMTP credentials to your settings.py and you can use the django core functions to send email messages.
https://docs.djangoproject.com/en/4.0/topics/email/#send-mail
https://docs.djangoproject.com/en/4.0/topics/email/#smtp-backend
I am new to sitecore developement and have one task to acheive using EXM and WFFM.
I have one newsletter subscription form which contains
Name
Email Address
Option to subscribe for News Letter or Current Vacancies
Captcha
Clicking on Submit, should send Email to the user with link to verify his email address. After clicking on link user will be added in email subscription list to receive newsletter and/or current openings.
I am not sure from where to start to implement this functionality. Any help in this regard is highly appreciated.
Thanks!
Mohit, this sounds like a small standalone project and it's hard to detail every single step in here, but I will at least point you on how to get started.
First of all, let me briefly explain the two Sitecore modules and how you can make them work togheter:
WFFM: Lets you create simple web forms that record and report information provided by visitors to your website
EXM: Lets you create and manage email messages, and manage subscription lists
In order to achive your project, you need to:
Create two subscription lists: Newsletter Subscription List and Current Vacancies Subscription List. Here are some instructions
Create the subscription form, containing the two subscription options. You can follow this detailed article from Sitecore, which explains how to create a form.
Trigger Confirmation email on WFFM submit and subscribe users to your lists: if you follow this article, you will understand how to add the "Subscribe to Recipient List" save action and to trigger a Subscription confirmation email
Configure EXM: Create a new message in EXM, which includes your subscription lists as recipients list
I hope this helps you get started.
We are using Sitecore 6.5, and the Email Campaign Manager 1.3.3 rev.130212 is installed.
Currently, when i add a Sitecore user, for example 'UserA' to multiple target audiences, lets say 'TargetAudience_A' and 'TargeAudience_B', after I send out these two target audiences, 'UserA' clicks the link in the email which comes from 'TargetAudience_A', then the link will bring user to the site, user visits several pages, Sitecore Analytics will be able to track 'UserA' VisitPageCount and Value, and creates the corresponding campaign of 'TargetAudience_A' with that data.
When the user opens the email sent from 'TargetAudience_B' and clicks the link, visits the site, NO campaign is created for 'TargetAudience_B' in the database, I can see all the data should use to create a new campaign for 'TargeAudience_B' is used to update campaign of 'TargetAudience_A'.
The whole link in the sent email has been modified by Sitecore, the corresponding campaign id is added, which makes the link looks like this:'httP:xx.domain.com/?ec_camp=xxxx&ec_as=xxxx'.
It seems that Sitecore just adds an Id to the url, but does not create a campaign for the 'TargeAudience_B' with that Id.
I use this sql query to check the visits data:
Select * From Visits join Automations on Visits.CampaignId = Automations.CampaignId
Where Automations.data = '{EmailTemplateId}'
the data column on Automations table is the email template id of the target audience.
Does any one know, how to track one user's activities for multiple campaigns? Is this possible to do? Or is this something which needs to be fixed by Sitecore?
Any help will be much much appreciated.
Thanks
EDIT: Sitecore does create Campaign for each target audience, but does not create Visits record for every one of them; Sitecore associates Campaign with the Visits, Sitecore cannot find\create Visits of 'TargeAudience_B', it finds the Visits of 'TargeAudience_A', for some reason it just updates the Visits record of 'TargetAudience_A'.
This does look right, does Sitecore create just one visit for a visitor a day no matter how many target audience this visitor in?
Neither target audience, the Visitor.ExternalUser or anything other than a fresh Visitor cookie will make DMS re-consider your visitor. So to answer your question, I do believe you are correct in your observation, and that this behavior is by design.
Also keep in mind; if your users click the email you send out from say their iPhone and come visit the site, they will be granted a Visitor ID. Later, when they're back home at their PC and click the same email again, they will get a fresh Visitor ID and will not be recognized by DMS as one and the same Visitor. This too, is by design.
If you want to achieve what I believe you're aiming to achieve, you're going to have to "tag" your Visitors with a key you recognize - like the email address - and then hook into the APIs and "grab" all Visitors that match your tagged email address. Not sure how well this will work with all areas of the DMS.
In my example above; if a user was triggered to enter an Engagement Plan or a State in an Engagement Plan - the "iPhone Visitor" would get attached to it - and any actions undertaken by the same person on his personal PC visitor profile on his desktop PC would not be affecting anything in this state.
Yes, it is a bit confusing - I may even have some slight details of this wrong - the DMS API changes a lot. But as far as I can determine, the above is correct and all by design.
To learn Django, I was making a very basic app which does the following:
Takes a user's login (checks id password in a database).
If user exists and password is right, give user option to either insert,delete or update.
If insert, user can insert an entry into a common table.
Similarly for delete or update.
I was cruising through this but I just got stuck.
My Login page is /index/.
Option for insert/delete/update is at /application/.
Now next, page is displayed according to insert/delete/update at /application/action/
Now the problem is that after completing one insertion, I want to return to /application to carry on my next operation.
But if I do that, I get this error
"Key 'userid' not found in <QueryDict: {}>"
So the view for /application/ is expecting the userid and password in request.POST.
How do I get around this without using external user login modules. I just want a very basic login system just to learn.
Django comes with user authentication built in. I don't think it is external as it is included in django.contrib.
If you use the built in user authentiaction and User model, you will not have to pass the userid to each view. Django will automatically retrieve the logged in user from the session and make it available as a property of the request object.
So using built in user and authentiaction, after logging in a user, you can access that user at
request.user
I have worked earlier on facebook API. I successfully used it and fetched all friend lists with their email ids. I was also able to get user email id who logged in through facebook API.
Now in gap of 7-8 months I found that faceAPI development section has been changed . New one is something different.
And now I am facing problem to get email id after user login at facebook.Yet all other details are coming like user name .user id and location except email id.
Old script is also not working with me. Could you help me to get email id of user who get login by facebook at my website.
Thanks for your cooperation.
No one will do your homework (upgrade the code for you)
Read the most current documentation
Accessing users e-mails require a special permission email
Users may choose not sharing their direct e-mail with you
You didn't say what technology you are using, but you can check the PHP-SDK example page to get started.
Direct Access Method:
Log into Facebook under your name. If you need an "Access Token", Click on the Extended Permissions and click the "read_friendlist" check box to get your Access Token and then
submit your query. You may need to "Allow" access, so just follow the prompts given.
Voila! You now have the usernames for everyone on your Friends List. The "username" parameter in the query will give you the contact email "message to that person" and you append #facebook.com and send them a message. Very simple.
http://developers.facebook.com/tools/explorer?fql=SELECT%20username%20FROM%20user%20WHERE%20uid%20IN%20%28SELECT%20uid2%20FROM%20friend%20WHERE%20uid1%20%3D%20me%28%29%29%20ORDER%20BY%20name
I had been using the import function in Yahoo Mail but now it has been limited to the first 50 names on your friends list. Where I work, they have over 6,000 friends between the two pages. This is a very simple solution to my problem. And now I can write a very small PHP sendmail program and send EVERYONE on the friends list an email message that goes directly to their messages. No more viewing page sources or manually doing this.
I can create a special email list on IFanz that will handle all dups, even if I repeat this process on a monthly basis to acquire new emails.
-SAB