Posts

Showing posts from November, 2020

Tracking Events and Properties Naming Conventions and Best Practice

Tracking has 2 parts, the event and the properties of the event and captured together will tell you what users are doing. Data Step 1 Event Naming Best Practice: Object & Action in past tense with "Title Casing" and spacing, eg "Product Added" where Product is the Object and Added is the Action Data Step 2 Event Property: Be consistency, use nouns and use snake_case (just stay that way), and do not nest properties, most downstream providers can use nested properties. This is what tells us what people are doing on the event.  Data Step 3 As a further clarity and to avoid having hundreds of events, the event names should be generalized and then the properties should be used for specificity, else you could end up with lets say  Product Added from Contact Page Product Added from List Page Product Added from Recommendation Or  just "Product Added", with a property of say "source" Think an example like this:  Event Name "Product Added" Pr

Lucee vs Adobe ColdFusion columnList vs getColumnList vs getmetadata

I have a general section which dynamically displays reports, which are preconfigured in a certain way.  There are some totals and data rows which are not part of the metrics so net result is I had some CF code looking at the column lists and displaying appropriately.  Turns out there are very different results between Lucee and Adobe Coldfusion, for this example, it's important to create a sample table like so:  CREATE TABLE testtable( [Col1] [varchar](50) NULL, [ACol2] [varchar](50) NULL ) so that ACol2 is actually alphabetically before Col1.  Then run this <cfquery datasource="aTestDSN" name="qry"> select * from testtable </cfquery> <cfset columns = ""> <cfloop array="#getmetadata(qry)#" item="aryItem"> <cfset columns = listappend(columns, aryItem.Name)> </cfloop> <table> <tr><td>getmetadata</td><td><cfoutput>#columns#</cfoutput></td></tr&