I hereby claim:
- I am wmcraver on github.
- I am wmcraver (https://keybase.io/wmcraver) on keybase.
- I have a public key ASDv3elJFsMoaaq0IqLzC_Y_QBfCbmLhhTbTZvVxQTLBVwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| library(docuSignr) | |
| library(dplyr) | |
| # Create env variables based on github directions for this package. https://github.com/CannaData/docuSignr | |
| # Sys.setenv("docuSign_username" = "username") | |
| # Sys.setenv("docuSign_password" = "password") | |
| # Sys.setenv("docuSign_integrator_key" = "integrator_key") | |
| login = docu_login() |
| // b.channel = b.channel // The data layer value goes here. Should look like: one two three. | |
| channelSplit = b.channel.split(" "); | |
| for (i = 0; i < channelSplit.length; i++) { | |
| channelSplit[i] = channelSplit[i].substring(0,1).toUpperCase() + channelSplit[i].substring(1,channelSplit[i].length); | |
| } | |
| b.channel = channelSplit.join(" "); // Change sectionName to the data layer variable. should look like: One Two Three. |
| library(urltools) | |
| # Read in the URLs | |
| dat = read.csv("LandingPageURLs.csv", stringsAsFactors = F) | |
| # Extract the scheme, domain, and path from the urls | |
| dat$scheme = scheme(dat$LandingPage) | |
| dat$domain = domain(dat$LandingPage) | |
| dat$path = path(dat$LandingPage) |
| sectionName = "word word word"; // The data layer value goes here. Should look like: best western rewards. | |
| sectionNameSplit = sectionName.split(" "); // Split the sectionName into an array -- separator is a space. | |
| for (i = 0; i < sectionNameSplit.length; i++) { | |
| sectionNameSplit[i] = sectionNameSplit[i].substring(0,1).toUpperCase() + sectionNameSplit[i].substring(1,sectionNameSplit[i].length); | |
| } | |
| sectionName = sectionNameSplit.join(" "); // "Word Word Word" stored back in sectionName | |
| // Change sectionName to value being sent to Analytics system from Tealium. |
| library(RSiteCatalyst) | |
| library(lubridate) | |
| library(dplyr) | |
| # SCAuth Info ------------------------------------------------------------- | |
| SCAuth(key = "", #fill in with your own info | |
| secret = "", #fill in with your own info | |
| company = "" #fill in with your own info |
| library(rvest) | |
| url2 = read_html("http://www.verticalmeasures.com/measurement-reporting/google-analytics-101-best-practices-for-ecommerce-websites/") | |
| newxpath = as.character('//*+[contains(concat( " ", @class, " " ), concat( " ", "sidebar-widget", " " ))]//*[contains(concat( " ", @class, " " ), concat( " ", "sidebar-widget", " " ))]//ul') | |
| titles = html_nodes(url2, css = "p") | |
| titles = html_text(titles) | |
| titles |
| library(RSiteCatalyst) | |
| library(dplyr) | |
| library(lubridate) | |
| SCAuth( | |
| "key", | |
| "secret", | |
| "company" | |
| ) |
| library(WriteXLS) | |
| # renderedExperience, marketingChannel, allMetrics are data frames | |
| sheetList <-list("Rendered Experience" = renderedExperience, "Marketing Channel" = marketingChannel, "Key Metrics" = allMetrics) | |
| WriteXLS( | |
| x = sheetList, | |
| ExcelFileName = "RenderedExperience-MarketingChannel.xlsx", | |
| SheetNames = names(sheetList), |
| urlStatusChecker = function(file,urlcol) { | |
| library(httr) | |
| dat = read.csv(file, stringsAsFactors = F) | |
| for (i in 1:nrow(dat)) { | |
| dat = dat[dat[urlcol] != "",] | |
| dat = dat = dat[!is.na(dat[urlcol]),] | |
| a = GET(dat[i,urlcol]) | |
| dat$URL[i] = a$url |