private void GenerateActivities( string campaignName, IReadOnlyDictionary <string, IEnumerable <ActivityDataParameters> > conversionHits, int contactsCount) { var siteName = _mSite.SiteName; var campaignInfo = CampaignInfoProvider.GetCampaignInfo(campaignName, siteName); var posterPath = CampaignDataGeneratorHelpers.GetDocument(PagePathAmericasCoffeePoster); var colombiaPath = CampaignDataGeneratorHelpers.GetDocument(PagePathColombia); var bizFormInfo = BizFormInfoProvider.GetBizFormInfo(TryFreeSampleFormCodeName, _mSite.SiteID); CampaignDataGeneratorHelpers.DeleteOldActivities(campaignInfo.CampaignUTMCode); var contactsIDs = new ContactsIdData(_contactEmailPostfix, contactsCount); CampaignDataGeneratorHelpers.GenerateActivities(conversionHits[ConversionPagevisitColombia], campaignInfo, "pagevisit", contactsIDs, colombiaPath.NodeID); CampaignDataGeneratorHelpers.GenerateActivities(conversionHits[ConversionPagevisitAmericasCoffeePoster], campaignInfo, "pagevisit", contactsIDs, posterPath.NodeID); CampaignDataGeneratorHelpers.GenerateActivities(conversionHits[ConversionUserregistration], campaignInfo, "userregistration", contactsIDs); CampaignDataGeneratorHelpers.GenerateActivities(conversionHits[ConversionFormsubmissionTryFreeSample], campaignInfo, "bizformsubmit", contactsIDs, bizFormInfo.FormID); }
private static IEnumerable <CampaignConversionData> PrepareCoffeeClubMembershipConversions() { var document = CampaignDataGeneratorHelpers.GetDocument(PagePathCoffeeClubMembership); var coffeeclubmembershipdocument = CampaignDataGeneratorHelpers.GetDocument("/Products/Brewers/AeroPress"); return(new List <CampaignConversionData> { new CampaignConversionData { ConversionName = "coffee_club_membership", ConversionDisplayName = document.DocumentName, ConversionActivityType = "purchasedproduct", ConversionItemId = coffeeclubmembershipdocument.NodeSKUID, ConversionOrder = 1, ConversionIsFunnelStep = false }, new CampaignConversionData { ConversionName = "coffee_club_membership_1", ConversionDisplayName = document.DocumentName, ConversionActivityType = "pagevisit", ConversionItemId = document.NodeID, ConversionOrder = 1, ConversionIsFunnelStep = true }, new CampaignConversionData { ConversionName = "coffee_club_membership_2", ConversionDisplayName = document.DocumentName, ConversionActivityType = "productaddedtoshoppingcart", ConversionItemId = coffeeclubmembershipdocument.NodeSKUID, ConversionOrder = 2, ConversionIsFunnelStep = true }, new CampaignConversionData { ConversionName = "coffee_club_membership_3", ConversionDisplayName = document.DocumentName, ConversionActivityType = "purchasedproduct", ConversionItemId = coffeeclubmembershipdocument.NodeSKUID, ConversionOrder = 3, ConversionIsFunnelStep = true } }); }
private IEnumerable <CampaignConversionData> PrepareCafeSamplePromotionConversions() { var document1 = CampaignDataGeneratorHelpers.GetDocument(PagePathAmericasCoffeePoster); var document2 = CampaignDataGeneratorHelpers.GetDocument(PagePathColombia); var bizFormInfo = BizFormInfoProvider.GetBizFormInfo(TryFreeSampleFormCodeName, _mSite.SiteID); return(new List <CampaignConversionData> { new CampaignConversionData { ConversionName = "try_free_sample", ConversionDisplayName = ConversionFormsubmissionTryFreeSample, ConversionActivityType = "bizformsubmit", ConversionItemId = bizFormInfo.FormID, ConversionOrder = 1, ConversionIsFunnelStep = false }, new CampaignConversionData { ConversionName = "america_coffee_poster", ConversionDisplayName = document1.DocumentName, ConversionActivityType = "pagevisit", ConversionItemId = document1.NodeID, ConversionOrder = 2, ConversionIsFunnelStep = false }, new CampaignConversionData { ConversionName = "userregistration", ConversionDisplayName = "", ConversionActivityType = "userregistration", ConversionItemId = new int?(), ConversionOrder = 3, ConversionIsFunnelStep = false }, new CampaignConversionData { ConversionName = "colombia", ConversionDisplayName = document2.DocumentName, ConversionActivityType = "pagevisit", ConversionItemId = document2.NodeID, ConversionOrder = 1, ConversionIsFunnelStep = true }, new CampaignConversionData { ConversionName = "try_free_sample_1", ConversionDisplayName = ConversionFormsubmissionTryFreeSample, ConversionActivityType = "bizformsubmit", ConversionItemId = bizFormInfo.FormID, ConversionOrder = 2, ConversionIsFunnelStep = true }, new CampaignConversionData { ConversionName = "america_coffee_poster_1", ConversionDisplayName = document1.DocumentName, ConversionActivityType = "pagevisit", ConversionItemId = document1.NodeID, ConversionOrder = 3, ConversionIsFunnelStep = true } }); }