Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Paul Seal 524 posts 2889 karma points MVP 7x c-trib
    Nov 17, 2016 @ 10:18
    Paul Seal
    1

    Help with naming and creating first umbraco package

    Hi, a friend and I have developed a package together. We want to publish it to appear in the package repository.

    Where do we start? What are the steps? Are there any rules for the names of packages? Can it have the word umbraco in the name? Can we use the same colour as umbraco's colours in our logo?

    It's a free package by the way.

    Any help would be much appreciated.

    Thanks

    Paul

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Nov 17, 2016 @ 20:33
    Dennis Aaen
    1

    Hi Paul,

    About rules for the naming of packages, try to see the thread below, and especially Douglas Robar comment.

    https://our.umbraco.org/forum/developers/extending-umbraco/7547-Naming-of-Packages

    Hope this helps,

    /Dennis

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 17, 2016 @ 22:48
    Lee Kelleher
    1

    Hi Paul,

    +1 on what Dennis says... Doug's comment hits the nail on the head.

    I did a talk at CodeGarden15 about developing "killer" packages, (with Matt Brailsford), we chat a bit about naming about 18mins into it.

    https://vimeo.com/channels/991640/132815036

    All I'll say is if you can avoid the "u"-prefix of package names, you'll stand in good stead ;-)

    Cheers,
    - Lee

  • Luke 11 posts 99 karma points
    Nov 18, 2016 @ 07:45
    Luke
    0

    Thanks for your help Lee and Dennis,

    I am working on this project with Paul.

    In your video you talk about a video on Umbraco.tv about creating packages, the nitty gritty. This seems to not be available anymore.

    Can you point me to it or something similar. We are particularly interested in using AppVeyor to build the package for us rather than having to use the Package Creator GUI.

    Thanks

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 18, 2016 @ 09:58
    Lee Kelleher
    1

    Hey Luke,

    Hmmm, I can't find the link for it either :-(

    Found a couple of other links to community blog posts:


    For help with the AppVeyor config, take a look at the appveyor.yml from our Nested Content package.
    It makes a call to an MSBuild script which builds both the Umbraco and NuGet packages. (for more details about that, Matt has an old blog post on Automating Umbraco Package Creation Using MSBuild.)

    Hope all this helps?

    Cheers,
    - Lee

  • Jon R. Humphrey 164 posts 455 karma points c-trib
    Nov 18, 2016 @ 10:27
    Jon R. Humphrey
    1

    @Luke & @Paul, can't wait to see what you're putting together!

    @Dennis & @Lee, Thanks for the links, I'm commenting to make a quick link for later reference!

  • Luke 11 posts 99 karma points
    Nov 22, 2016 @ 05:24
    Luke
    0

    Thanks Lee,

    I have found it quite hard to track down much documentation on building packages. Even Umbraco.tv has just about nothing on it which seems silly as DNN's strong store is the only hinderance to Umbraco well and truly becoming the dominante .NET CMS. I think this would be a great topic for a tutorial series. Maybe when I figure out some of the things we battled with I will try and do one :)

    We are just about ready to ship but are struggling with issue relating to the adding of content as a part of our package. For some reason our Dropdown lists seem to exported fine (looking at the package.xml) but on the other side come through deselected. What is even more weird is that the validators are not working which means that the values are probably set to an empty string.

    It smells a lot like a bug to me and I am wondering if you have faced this issue before?

    I would be happy to send through the package.xml for anyone who might be able to point us to the issue. It is generated straight from the package creator tool.

  • Luke 11 posts 99 karma points
    Nov 22, 2016 @ 05:24
    Luke
    0

    Thanks Jon.

    I will be sure to notify you when we ship.

  • Jon R. Humphrey 164 posts 455 karma points c-trib
    Nov 22, 2016 @ 07:19
    Jon R. Humphrey
    1

    Thanks @Luke, happy to help if another pair of eyes would be of service? While I've not added any public packages to Umbraco I've created quite a few for clients. #everylittlehelps

  • Luke 11 posts 99 karma points
    Nov 22, 2016 @ 08:56
    Luke
    0

    Thanks Jon.

    This is the package.xml. Can you see any glaring issues?

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <umbPackage>
      <files>
        <file>
          <guid>Event.cs</guid>
          <orgPath>/App_Code/GAEventTracking</orgPath>
          <orgName>Event.cs</orgName>
        </file>
        <file>
          <guid>EventContentHelper.cs</guid>
          <orgPath>/App_Code/GAEventTracking</orgPath>
          <orgName>EventContentHelper.cs</orgName>
        </file>
        <file>
          <guid>HtmlExtensions.cs</guid>
          <orgPath>/App_Code/GAEventTracking</orgPath>
          <orgName>HtmlExtensions.cs</orgName>
        </file>
        <file>
          <guid>Keys.cs</guid>
          <orgPath>/App_Code/GAEventTracking</orgPath>
          <orgName>Keys.cs</orgName>
        </file>
        <file>
          <guid>RegisterEvents.cs</guid>
          <orgPath>/App_Code/GAEventTracking</orgPath>
          <orgName>RegisterEvents.cs</orgName>
        </file>
        <file>
          <guid>GAEventTrackingController.cs</guid>
          <orgPath>/App_Code/GAEventTracking/Controllers</orgPath>
          <orgName>GAEventTrackingController.cs</orgName>
        </file>
        <file>
          <guid>_GoogleAnalytics.cshtml</guid>
          <orgPath>/Views/Partials</orgPath>
          <orgName>_GoogleAnalytics.cshtml</orgName>
        </file>
        <file>
          <guid>_GAEventTracking.cshtml</guid>
          <orgPath>/Views/Partials</orgPath>
          <orgName>_GAEventTracking.cshtml</orgName>
        </file>
        <file>
          <guid>UmbracoGAEventTracking.js</guid>
          <orgPath>/scripts</orgPath>
          <orgName>UmbracoGAEventTracking.js</orgName>
        </file>
      </files>
      <info>
        <package>
          <name>Google Analytics Events for Umbraco</name>
          <version>1.0.0</version>
          <iconUrl>https://raw.githubusercontent.com/codelaborators-network/Google-Analytics-Events-for-Umbraco/master/Logos/logo_200_200.jpg</iconUrl>;
          <license url="http://opensource.org/licenses/MIT">MIT License</license>
          <url>https://codelaborators-network.github.io/Google-Analytics-Events-for-Umbraco/</url>;
          <requirements type="strict">
            <major>7</major>
            <minor>5</minor>
            <patch>4</patch>
          </requirements>
        </package>
        <author>
          <name>Luke Warren and Paul Seal</name>
          <website>https://codelaborators-network.github.io/Google-Analytics-Events-for-Umbraco/</website>;
        </author>
        <readme><![CDATA[# Google Analytics Events for Umbraco
    ![Google Analytics Events for Umbraco Logo](https://github.com/codelaborators-network/Google-Analytics-Events-for-Umbraco/blob/master/Logos/logo_200_200.jpg?raw=true "Google Analytics Events for Umbraco Logo")
    
    A package for adding manageable GA Event Tracking to your Umbraco site.
    
    ## Install
    
    1. Install the Google Analytics Events for Umbraco package
    2. Add the Following code to your master template (order is important)
    
    ```javascript
    
    @using UmbracoGAEventTracking;
    
    @Html.IncludeGoogleAnalytics() // Only needed if you have not already included Google Analytics. You can add your GA Key in Umbraco.
    @Html.IncludeGaEventTracking()
    
    ```
    
    ### Please read the [Documentation Website](https://github.com/codelaborators-network/Google-Analytics-Events-for-Umbraco) for more in depth guidelines]]></readme>
      </info>
      <Documents>
        <DocumentSet importMode="root">
          <googleAnalyticsEventRoot id="1086" key="17c852ef-c704-4334-886e-220fe19bd1a5" parentID="-1" level="1" creatorID="0" sortOrder="1" createDate="2016-11-15T22:25:24" updateDate="2016-11-21T14:37:23" nodeName="Google Analytics Event Tracking" urlName="google-analytics-event-tracking" path="-1,1086" isDoc="" nodeType="1083" creatorName="Host" writerName="Host" writerID="0" template="1097" nodeTypeAlias="googleAnalyticsEventRoot">
            <googleAnalyticsKey><![CDATA[UA-XXXXXXXX-1]]></googleAnalyticsKey>
            <googleAnalyticsEvent_DisableEvents>0</googleAnalyticsEvent_DisableEvents>
            <googleAnalyticsStandardEvent id="1106" key="a0471bb8-15b9-44e9-bedd-13d8538bdf37" parentID="1086" level="2" creatorID="0" sortOrder="0" createDate="2016-11-21T12:06:52" updateDate="2016-11-21T18:12:44" nodeName="External Link" urlName="external-link" path="-1,1086,1106" isDoc="" nodeType="1096" creatorName="Host" writerName="Host" writerID="0" template="1097" nodeTypeAlias="googleAnalyticsStandardEvent">
              <googleAnalyticsEvent_CssSelector><![CDATA[a[target=_blank]]]></googleAnalyticsEvent_CssSelector>
              <googleAnalyticsEvent_Category><![CDATA[External Links]]></googleAnalyticsEvent_Category>
              <googleAnalyticsEvent_Label><![CDATA[Link Url,Inner Html]]></googleAnalyticsEvent_Label>
              <googleAnalyticsEvent_Action><![CDATA[click]]></googleAnalyticsEvent_Action>
            </googleAnalyticsStandardEvent>
            <googleAnalyticsStandardEvent id="1104" key="2fef5163-6547-4267-a988-4137fae7a261" parentID="1086" level="2" creatorID="0" sortOrder="1" createDate="2016-11-21T11:58:57" updateDate="2016-11-21T18:00:57" nodeName="Footer Link" urlName="footer-link" path="-1,1086,1104" isDoc="" nodeType="1096" creatorName="Host" writerName="Host" writerID="0" template="1097" nodeTypeAlias="googleAnalyticsStandardEvent">
              <googleAnalyticsEvent_CssSelector><![CDATA[footer a]]></googleAnalyticsEvent_CssSelector>
              <googleAnalyticsEvent_Category><![CDATA[Footer Links]]></googleAnalyticsEvent_Category>
              <googleAnalyticsEvent_Label><![CDATA[Link Url,Inner Html]]></googleAnalyticsEvent_Label>
              <googleAnalyticsEvent_Action><![CDATA[click]]></googleAnalyticsEvent_Action>
            </googleAnalyticsStandardEvent>
            <googleAnalyticsStandardEvent id="1105" key="34b574b3-ff61-41a0-a3b1-0c8ec8d74e63" parentID="1086" level="2" creatorID="0" sortOrder="2" createDate="2016-11-21T12:05:27" updateDate="2016-11-21T18:00:52" nodeName="Form Submit" urlName="form-submit" path="-1,1086,1105" isDoc="" nodeType="1096" creatorName="Host" writerName="Host" writerID="0" template="1097" nodeTypeAlias="googleAnalyticsStandardEvent">
              <googleAnalyticsEvent_CssSelector><![CDATA[form]]></googleAnalyticsEvent_CssSelector>
              <googleAnalyticsEvent_Category><![CDATA[Form Submit]]></googleAnalyticsEvent_Category>
              <googleAnalyticsEvent_Label><![CDATA[Page Url,Id]]></googleAnalyticsEvent_Label>
              <googleAnalyticsEvent_Action><![CDATA[submit]]></googleAnalyticsEvent_Action>
            </googleAnalyticsStandardEvent>
            <googleAnalyticsStandardEvent id="1108" key="0c415acf-3ec6-4339-bd85-107fb301f977" parentID="1086" level="2" creatorID="0" sortOrder="3" createDate="2016-11-21T12:10:38" updateDate="2016-11-21T17:51:15" nodeName="Image" urlName="image" path="-1,1086,1108" isDoc="" nodeType="1096" creatorName="Host" writerName="Host" writerID="0" template="1097" nodeTypeAlias="googleAnalyticsStandardEvent">
              <googleAnalyticsEvent_CssSelector><![CDATA[img]]></googleAnalyticsEvent_CssSelector>
              <googleAnalyticsEvent_Category><![CDATA[Images]]></googleAnalyticsEvent_Category>
              <googleAnalyticsEvent_Label><![CDATA[Src,Alt]]></googleAnalyticsEvent_Label>
              <googleAnalyticsEvent_Action><![CDATA[click]]></googleAnalyticsEvent_Action>
            </googleAnalyticsStandardEvent>
            <googleAnalyticsStandardEvent id="1107" key="0bcf66e9-fac8-4e45-aba4-48966815c07f" parentID="1086" level="2" creatorID="0" sortOrder="4" createDate="2016-11-21T12:07:45" updateDate="2016-11-21T17:51:05" nodeName="Main Navigation" urlName="main-navigation" path="-1,1086,1107" isDoc="" nodeType="1096" creatorName="Host" writerName="Host" writerID="0" template="1097" nodeTypeAlias="googleAnalyticsStandardEvent">
              <googleAnalyticsEvent_CssSelector><![CDATA[a]]></googleAnalyticsEvent_CssSelector>
              <googleAnalyticsEvent_Category><![CDATA[Main Navigation]]></googleAnalyticsEvent_Category>
              <googleAnalyticsEvent_Label><![CDATA[Link Url,Inner Html]]></googleAnalyticsEvent_Label>
              <googleAnalyticsEvent_Action><![CDATA[click]]></googleAnalyticsEvent_Action>
            </googleAnalyticsStandardEvent>
            <googleAnalyticsStandardEvent id="1103" key="17478602-8663-43d3-b7b2-493d3c8d46da" parentID="1086" level="2" creatorID="0" sortOrder="5" createDate="2016-11-21T11:22:35" updateDate="2016-11-21T18:00:27" nodeName="PDF Download" urlName="pdf-download" path="-1,1086,1103" isDoc="" nodeType="1096" creatorName="Host" writerName="Host" writerID="0" template="1097" nodeTypeAlias="googleAnalyticsStandardEvent">
              <googleAnalyticsEvent_CssSelector><![CDATA[a[href$= ".pdf"]]]></googleAnalyticsEvent_CssSelector>
              <googleAnalyticsEvent_Category><![CDATA[ PDF Download]]></googleAnalyticsEvent_Category>
              <googleAnalyticsEvent_Label><![CDATA[Page Url,Link Url,Title]]></googleAnalyticsEvent_Label>
              <googleAnalyticsEvent_Action><![CDATA[click]]></googleAnalyticsEvent_Action>
            </googleAnalyticsStandardEvent>
            <googleAnalyticsStandardEvent id="1099" key="44115ce4-1343-402b-bc54-10adf3017734" parentID="1086" level="2" creatorID="0" sortOrder="6" createDate="2016-11-18T13:18:38" updateDate="2016-11-21T18:00:17" nodeName="Standard h1" urlName="standard-h1" path="-1,1086,1099" isDoc="" nodeType="1096" creatorName="Host" writerName="Host" writerID="0" template="1097" nodeTypeAlias="googleAnalyticsStandardEvent">
              <googleAnalyticsEvent_CssSelector><![CDATA[h1]]></googleAnalyticsEvent_CssSelector>
              <googleAnalyticsEvent_Category><![CDATA[Header 1]]></googleAnalyticsEvent_Category>
              <googleAnalyticsEvent_Label><![CDATA[Page Url,Inner Html]]></googleAnalyticsEvent_Label>
              <googleAnalyticsEvent_Action><![CDATA[click]]></googleAnalyticsEvent_Action>
            </googleAnalyticsStandardEvent>
            <googleAnalyticsEventItem id="1087" key="db294b8e-8e44-4812-a3c1-885fff7dfcf7" parentID="1086" level="2" creatorID="0" sortOrder="7" createDate="2016-11-15T22:26:20" updateDate="2016-11-21T18:00:12" nodeName="Advanced h2 with all label options" urlName="advanced-h2-with-all-label-options" path="-1,1086,1087" isDoc="" nodeType="1085" creatorName="Host" writerName="Host" writerID="0" template="0" nodeTypeAlias="googleAnalyticsEventItem">
              <googleAnalyticsEvent_CssSelector><![CDATA[h2]]></googleAnalyticsEvent_CssSelector>
              <googleAnalyticsEvent_Category><![CDATA[Advanced Header 2]]></googleAnalyticsEvent_Category>
              <googleAnalyticsEvent_Action><![CDATA[click]]></googleAnalyticsEvent_Action>
              <googleAnalyticsEvent_Label><![CDATA[PageUrl: {PAGE_URL}, PageRelativeUrl: {PAGE_RELATIVE_URL}, TagName: {TAG_NAME}, ID: {ID} , Class: {CLASS}, Value: {VALUE}, Src: {SRC}, LinkUrl: {LINK_URL}, LinkRelativeUrl: {LINK_RELATIVE_URL}, Alt: {ALT}, Title {TITLE}, InneHTML {INNER_HTML}]]></googleAnalyticsEvent_Label>
            </googleAnalyticsEventItem>
          </googleAnalyticsEventRoot>
        </DocumentSet>
      </Documents>
      <DocumentTypes>
        <DocumentType Folders="GA+Events">
          <Info>
            <Name>Advanced Event</Name>
            <Alias>googleAnalyticsEventItem</Alias>
            <Icon>icon-mouse-cursor color-red</Icon>
            <Thumbnail>folder.png</Thumbnail>
            <Description>I want a bit more control of my label and action</Description>
            <AllowAtRoot>False</AllowAtRoot>
            <IsListView>False</IsListView>
            <Compositions>
              <Composition>googleAnalyticsStandardEvent1</Composition>
            </Compositions>
            <AllowedTemplates>
              <Template>GoogleAnalyticsDefaultTemplate</Template>
            </AllowedTemplates>
            <DefaultTemplate>GoogleAnalyticsDefaultTemplate</DefaultTemplate>
          </Info>
          <Structure />
          <GenericProperties>
            <GenericProperty>
              <Name>Action</Name>
              <Alias>googleAnalyticsEvent_Action</Alias>
              <Type>Umbraco.DropDown</Type>
              <Definition>eef4206e-15b9-4175-b310-287767680e3f</Definition>
              <Tab>Event Properties</Tab>
              <SortOrder>2</SortOrder>
              <Mandatory>True</Mandatory>
              <Description><![CDATA[The action type that you are listening for on the element. Example: The "click" action will fire when an element is clicked]]></Description>
            </GenericProperty>
            <GenericProperty>
              <Name>Label</Name>
              <Alias>googleAnalyticsEvent_Label</Alias>
              <Type>Umbraco.Textbox</Type>
              <Definition>0cc0eba1-9960-42c9-bf9b-60e150b429ae</Definition>
              <Tab>Event Properties</Tab>
              <SortOrder>3</SortOrder>
              <Mandatory>True</Mandatory>
              <Description><![CDATA[The label to use for the GA event. Please note that this is templatable. Simple enter one of the following placeholders and it will be replaced by the appropriate value when the vent takes place: PageUrl: {PAGE_URL}, PageRelativeUrl: {PAGE_RELATIVE_URL}, TagName: {TAG_NAME}, ID: {ID} , Class: {CLASS}, Value: {VALUE}, Src: {SRC}, LinkUrl: {LINK_URL}, LinkRelativeUrl: {LINK_RELATIVE_URL}, Alt: {ALT}, Title: {TITLE}, InnerHTML: {INNER_HTML}]]></Description>
            </GenericProperty>
          </GenericProperties>
          <Tabs>
            <Tab>
              <Id>20</Id>
              <Caption>Event Properties</Caption>
              <SortOrder>0</SortOrder>
            </Tab>
          </Tabs>
        </DocumentType>
        <DocumentType Folders="GA+Events">
          <Info>
            <Name>Event Base</Name>
            <Alias>googleAnalyticsStandardEvent1</Alias>
            <Icon>icon-mouse-cursor color-green</Icon>
            <Thumbnail>folder.png</Thumbnail>
            <Description>Lets do things the easy way</Description>
            <AllowAtRoot>False</AllowAtRoot>
            <IsListView>False</IsListView>
            <Compositions />
            <AllowedTemplates>
              <Template>GoogleAnalyticsDefaultTemplate</Template>
            </AllowedTemplates>
            <DefaultTemplate>GoogleAnalyticsDefaultTemplate</DefaultTemplate>
          </Info>
          <Structure />
          <GenericProperties>
            <GenericProperty>
              <Name>CSS Selector</Name>
              <Alias>googleAnalyticsEvent_CssSelector</Alias>
              <Type>Umbraco.Textbox</Type>
              <Definition>0cc0eba1-9960-42c9-bf9b-60e150b429ae</Definition>
              <Tab>Event Properties</Tab>
              <SortOrder>0</SortOrder>
              <Mandatory>True</Mandatory>
              <Description><![CDATA[The CSS selector that will be used to attach the GA event to the element. Example: ".someClass", "#some-id", "h1"]]></Description>
            </GenericProperty>
            <GenericProperty>
              <Name>Category</Name>
              <Alias>googleAnalyticsEvent_Category</Alias>
              <Type>Umbraco.Textbox</Type>
              <Definition>0cc0eba1-9960-42c9-bf9b-60e150b429ae</Definition>
              <Tab>Event Properties</Tab>
              <SortOrder>3</SortOrder>
              <Mandatory>True</Mandatory>
              <Description><![CDATA[The category the event should be classified in the Google Analytics dashboard]]></Description>
            </GenericProperty>
          </GenericProperties>
          <Tabs>
            <Tab>
              <Id>23</Id>
              <Caption>Event Properties</Caption>
              <SortOrder>0</SortOrder>
            </Tab>
          </Tabs>
        </DocumentType>
        <DocumentType Folders="GA+Events">
          <Info>
            <Name>Google Analytics Tracking</Name>
            <Alias>googleAnalyticsEventRoot</Alias>
            <Icon>icon-chart-curve color-orange</Icon>
            <Thumbnail>folder.png</Thumbnail>
            <Description>Adds the ability to easily create and manage Google Analytics Events</Description>
            <AllowAtRoot>True</AllowAtRoot>
            <IsListView>False</IsListView>
            <Compositions />
            <AllowedTemplates>
              <Template>GoogleAnalyticsDefaultTemplate</Template>
            </AllowedTemplates>
            <DefaultTemplate>GoogleAnalyticsDefaultTemplate</DefaultTemplate>
          </Info>
          <Structure>
            <DocumentType>googleAnalyticsEventItem</DocumentType>
            <DocumentType>googleAnalyticsStandardEvent</DocumentType>
          </Structure>
          <GenericProperties>
            <GenericProperty>
              <Name>Google Analytics Key</Name>
              <Alias>googleAnalyticsKey</Alias>
              <Type>Umbraco.Textbox</Type>
              <Definition>0cc0eba1-9960-42c9-bf9b-60e150b429ae</Definition>
              <Tab>General Settings</Tab>
              <SortOrder>1</SortOrder>
              <Mandatory>False</Mandatory>
              <Description><![CDATA[Enter your unique GA property id here to be used on the page]]></Description>
            </GenericProperty>
            <GenericProperty>
              <Name>Disable GA Events</Name>
              <Alias>googleAnalyticsEvent_DisableEvents</Alias>
              <Type>Umbraco.TrueFalse</Type>
              <Definition>92897bc6-a5f3-4ffe-ae27-f2e7e33dda49</Definition>
              <Tab>General Settings</Tab>
              <SortOrder>0</SortOrder>
              <Mandatory>False</Mandatory>
              <Description><![CDATA[Settings this flag will disable all events on all pages.]]></Description>
            </GenericProperty>
          </GenericProperties>
          <Tabs>
            <Tab>
              <Id>19</Id>
              <Caption>General Settings</Caption>
              <SortOrder>0</SortOrder>
            </Tab>
          </Tabs>
        </DocumentType>
        <DocumentType Folders="GA+Events">
          <Info>
            <Name>Standard Event</Name>
            <Alias>googleAnalyticsStandardEvent</Alias>
            <Icon>icon-mouse-cursor color-green</Icon>
            <Thumbnail>folder.png</Thumbnail>
            <Description>Lets do things the easy way</Description>
            <AllowAtRoot>False</AllowAtRoot>
            <IsListView>False</IsListView>
            <Compositions>
              <Composition>googleAnalyticsStandardEvent1</Composition>
            </Compositions>
            <AllowedTemplates>
              <Template>GoogleAnalyticsDefaultTemplate</Template>
            </AllowedTemplates>
            <DefaultTemplate>GoogleAnalyticsDefaultTemplate</DefaultTemplate>
          </Info>
          <Structure />
          <GenericProperties>
            <GenericProperty>
              <Name>Label</Name>
              <Alias>googleAnalyticsEvent_Label</Alias>
              <Type>Umbraco.CheckBoxList</Type>
              <Definition>2cf863f7-8738-44fe-a8e1-dd0b1bd45387</Definition>
              <Tab>Event Properties</Tab>
              <SortOrder>3</SortOrder>
              <Mandatory>True</Mandatory>
              <Description><![CDATA[Choose which information you would like to appear in the label in Google Analytics. If you want more control of this, create a Google Analytics Advanced Event instead.]]></Description>
            </GenericProperty>
            <GenericProperty>
              <Name>Action</Name>
              <Alias>googleAnalyticsEvent_Action</Alias>
              <Type>Umbraco.DropDown</Type>
              <Definition>ba55c9b2-a5ef-4696-8fde-23b944dc4bc7</Definition>
              <Tab>Event Properties</Tab>
              <SortOrder>2</SortOrder>
              <Mandatory>True</Mandatory>
              <Description><![CDATA[The action type that you are listening for on the element. Example: The "click" action will fire when an element is clicked]]></Description>
            </GenericProperty>
          </GenericProperties>
          <Tabs>
            <Tab>
              <Id>21</Id>
              <Caption>Event Properties</Caption>
              <SortOrder>0</SortOrder>
            </Tab>
          </Tabs>
        </DocumentType>
      </DocumentTypes>
      <Templates>
        <Template>
          <Name>Google Analytics Default Template</Name>
          <Alias>GoogleAnalyticsDefaultTemplate</Alias>
          <Design><![CDATA[@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    @{
        Layout = null;
        Response.Redirect('/');
    }]]></Design>
        </Template>
      </Templates>
      <Stylesheets />
      <Macros />
      <DictionaryItems />
      <Languages />
      <DataTypes>
        <DataType Name="GA Standard JavaScript Action Types" Id="Umbraco.DropDown" Definition="ba55c9b2-a5ef-4696-8fde-23b944dc4bc7" DatabaseType="Nvarchar" Folders="GA+Events">
          <PreValues>
            <PreValue Id="53" Value="click" Alias="0" SortOrder="0" />
            <PreValue Id="54" Value="change" Alias="1" SortOrder="1" />
            <PreValue Id="55" Value="submit" Alias="2" SortOrder="2" />
            <PreValue Id="56" Value="dblclick" Alias="3" SortOrder="3" />
          </PreValues>
        </DataType>
        <DataType Name="GA Event Label Placeholder List" Id="Umbraco.CheckBoxList" Definition="2cf863f7-8738-44fe-a8e1-dd0b1bd45387" DatabaseType="Nvarchar" Folders="GA+Events">
          <PreValues>
            <PreValue Id="21" Value="Page Url" Alias="0" SortOrder="0" />
            <PreValue Id="22" Value="Page Relative Url" Alias="1" SortOrder="1" />
            <PreValue Id="23" Value="Tag Name" Alias="2" SortOrder="2" />
            <PreValue Id="24" Value="Id" Alias="3" SortOrder="3" />
            <PreValue Id="25" Value="Class" Alias="4" SortOrder="4" />
            <PreValue Id="26" Value="Value" Alias="5" SortOrder="5" />
            <PreValue Id="27" Value="Src" Alias="6" SortOrder="6" />
            <PreValue Id="28" Value="Link Url" Alias="7" SortOrder="7" />
            <PreValue Id="29" Value="Link Relative Url" Alias="8" SortOrder="8" />
            <PreValue Id="30" Value="Alt" Alias="9" SortOrder="9" />
            <PreValue Id="31" Value="Title" Alias="10" SortOrder="10" />
            <PreValue Id="32" Value="Inner Html" Alias="11" SortOrder="11" />
          </PreValues>
        </DataType>
        <DataType Name="GA Advanced JavaScript Action Types" Id="Umbraco.DropDown" Definition="eef4206e-15b9-4175-b310-287767680e3f" DatabaseType="Nvarchar" Folders="GA+Events">
          <PreValues>
            <PreValue Id="57" Value="click" Alias="0" SortOrder="0" />
            <PreValue Id="58" Value="dblclick" Alias="1" SortOrder="1" />
            <PreValue Id="59" Value="scroll" Alias="2" SortOrder="2" />
          </PreValues>
        </DataType>
      </DataTypes>
    </umbPackage>
    
  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 22, 2016 @ 09:37
    Lee Kelleher
    1

    Hey Luke,

    I think it looks like a bug in Umbraco. The "Umbraco.DropDown" property-editor would need to reference the prevalue's Id, rather than the Value.

    I suspect that the package installer doesn't attempt to do a reverse lookup on the prevalues.

    I've had a look in the issue tracker, but couldn't find any raised bugs about it. Please feel free to raise one.


    In terms of a workaround... we have our own custom property-editor for dropdowns, (mostly because of this prevalue ID concern), where we save/reference the actual value, rather than the ID.

    https://github.com/leekelleher/umbraco-dictionary-dropdown

    Note: This is an unreleased property-editor, we use it on many of our client projects... you're welcome to use the code (it's MIT licensed), but we can't offer support on it. (But given we haven't actually updated it in 3 years, kinda proves it works) ;-)

    I hope this helps?

    Cheers,
    - Lee

  • Luke 11 posts 99 karma points
    Nov 22, 2016 @ 10:04
    Luke
    0

    Thanks so much, Lee. I thought as much and will log an issue.

    I will move our package over to use your dropdown editor and hopefully ship before the end of this week.

    Thanks again.

  • Luke 11 posts 99 karma points
    Nov 22, 2016 @ 12:27
    Luke
    0

    OK that did the trick and I have logged an issue

    The last thing to "fix" is that the content, which is added at the root, is unpublished when added (although now intact).

    Is there any way to make this content published by default?

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 22, 2016 @ 13:38
    Lee Kelleher
    0

    Hi Luke,

    I don't think there's currently a way to have the package installer automatically publish the imported content nodes.

    Take a look at a package called Articulate to see how it does it. (Articulate is developed by Shannon from the core team).

    The package.xml uses a post-install user-control, (Installer.ascx), which inherits from this code (Installer.cs), that calls some code to set some values and publish the nodes, (ArticulateDataInstaller.cs).

    I hope this helps?

    Cheers,
    - Lee

  • Paul Seal 524 posts 2889 karma points MVP 7x c-trib
    Nov 22, 2016 @ 14:18
    Paul Seal
    1

    Thanks for your help Lee. So we were on the right lines with the user control to show up after install Luke. You can make it look nice too with proper styled HTML so it can look like our documentation page.

  • Luke 11 posts 99 karma points
    Nov 23, 2016 @ 16:44
    Luke
    1

    Hey Guys,

    Just thought I would notify all that we have shipped the package.

    It is a simple package that allows you to easily add Google Analytics Events to your content.

    It has a side feature of letting you include google analytics too via HTML helpers.

    Package Page: https://our.umbraco.org/projects/website-utilities/google-analytics-events-for-umbraco/

    Here are the docs to read more about it: https://codelaborators-network.github.io/Google-Analytics-Events-for-Umbraco/

    To anyone facing similar issues regarding the installing and publishing of content, we went with the solution advised by Lee which involves creating a user control. See the source for an example.

    Thanks for your help guys.

  • M N 125 posts 212 karma points
    Jul 03, 2017 @ 19:13
    M N
    0

    Heya Luke, how did you guys work around the version issue. I try to install your package but continually get Version errors on 7.5.6

    Have you experienced this? enter image description here

  • M N 125 posts 212 karma points
    Jul 03, 2017 @ 19:24
    M N
    0

    Disregard - I found some posts referencing general package issues with 7.5.6. Bumped up to 7.5.14 and it's happy again :)

    Cheers!

Please Sign in or register to post replies

Write your reply to:

Draft