Jump to content

Wanze

PW-Moderators
  • Posts

    1,116
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Wanze

  1. Yeah that's great thank you for finding this one! Seems like Google does not accept this parameter anymore, worked fine some weeks ago... I will update the source on Github today.
  2. No it's not. After authenticating with Oauth, the Module should give you a Dropdown to choose your Analytics Account (Domain!). It grabs the ID and stores it. If you delete the ID in the modules setting, you should be able to choose an Account from the dropdown again. Thank you for your tip, i will remove the dependency for MarkupCache, didn't know that it will be installed by Pw! Thanks. But if the module would work correctly, it would set this Id for you after you have chosen the GA-Account from the dropdown. No need to find it out by yourself! Please note that you can only display statistics from one Domain. There's definitely something going wrong Tomorrow: I'll grab a fresh copy of Pw, create a new Google API's Project and finally install the module. Hope I can reproduce what's not working...
  3. Can you delete all the cache files startin with "ga_" in "site/assets/cache/MarkupCache/" Just to make sure that the 403 errors are not cached! If this doesn't work, I have to look in the docs from Google in which cases this error is returned... Think I need to do some more error checking in the whole module...
  4. Guys, Sorry for the problems, let's find out why it isn't working. The correct ID you must provide is really hard to find out and the docs from Google suck! If you can't see the dropdown to select an GA-Account, then we need to debug together because I just tested and it works on my installation. Please try this: Enter the ID manually and check if the module works. You can find the ID in the Browsers URL when you are watching the statistics inside the normal Google Analytics page. The ID is build with the numbers after the "p": Add these numbers in the module settings (Google Analytics Account Id) and add "ga:" in front -> Format: ga:xxxxxxx Does it work? Normally, the module should do this step for you by detecting all your accounts and then display the dropdown:
  5. I'll buy a licence for sure, thanks so much for doing this! Amazing
  6. max_execution_time AND max_input_time set to 30? I remember also had once a problem when setting these values too big. Another thought: Mod_security active?
  7. Does your if statement now look like this? if ($page->project_url AND $page->show_url == 1) { This should never be true if show_url is int(0).... hmmm
  8. Just an idea, what do you get doing the following: var_dump($page->project_url); Because if $page->project_url is null/false or an empty String '', the if condition will never be true. Empty strings are converted to false by PHP. Edit: Oops just realized that your problem's the opposite. You must use the "==" operator. What do you get when you're doing this on a page where show_url should be false: var_dump($page->show_url);
  9. Yeeeees! Thank you Ryan Now just hoping to get some projects I can build with ProcessWire...!
  10. Can you post the error message or say what exactly isn't working? Because it should work ;-)
  11. Where exactly are you calling this? If you're inside a static method, you don't have access to the "$this" object, you can use $page = wire('pages')->get(123);
  12. Just commited version 1.1.1 Fixed PHP notices when debug mode is enabled (thanks Sevarf2!) If no results are returned from GA, display "no results found" Added module config option for a default date range: last 24 hours, last 2 days, last 3 days etc. If you want to look back more than 2 months by default, tell me... i'll add more values Traffic Sources: Added Referral Sources by URL. Provides also a link to visit the referral page, but as Ryan mentioned earlier, sometimes uri-variables are stripped resulting in invalid links! When you set a custom date range in the options section, you are "overwriting" the default date range. This can still be handy, for example if you want to look quickly at statistics from the past. Reset the custom date range to display stats again from the default one.
  13. Wanze

    velokurier.com

    Haha he's driving the other direction =) And i never saw some birds flying backwards that fast Really nice and modern site!
  14. Hi Gazley, I think you're doing it the right way by looking at other modules. I'm still new to ProcessWire and just built my first module, will continue to improve it. After reading the docs, I started looking at modules in wire/modules and also downloaded some modules already developed by the pro's ;-) What helps me a lot is to look at the extended classes and implemented interfaces. The code there is pretty well commented! So for example, check out extended classes like "WireData" (Data.php in the core directory), "Wire" and the implemented interfaces. A lot of the magic happens there I still have to learn a lot more about Pw, but once you understand how it works... it is really fun coding and building a module, because the architecture of Pw is amazing!
  15. I remember seeing this somewhere, should be possible to implement with the GA api. Will be there in the next version I think another module option to define the default date range makes sense. Currently, this is always a month back from "today". I will add a dropdown one can choose the the date range (24 hours, 2 days, 3 days... 1 week, 2 weeks etc.) Thank you for testing, glad it turned out to be this simple! ;-) Will add the check in the next version. One quick fix for you is to visit the site with your mobile phone
  16. That's because the results were getting cached. But you still don't see any Statistics, right? I think there has to be an error in your setup somewhere. Tested also the date "d-m-Y", works fine here on my local installation. Will check if Google reports back some error codes in case something went wrong with the query params... Edit: If you want to do some more testing, you should disable caching the output: 1) Delete the folders starting with "ga_" in site/assets/cache/MarkupCache 2) In the Module Options, set Cache Time to "0"
  17. Hmm for some reason the module could not fetch the statistics. I need to implement a check if the results are returned correctly as an array and display an error message otherwise. Sevraf2, were you able to choose the GA Account from the dropdown before? Have you customized the date range or any date format settings? Can you do some checks in the module config options: Client ID, Client Secret, API Key correct? Google Analytics Account Id should now have a value like "ga:xxxxxxxx" @Soma I have debug mode enabled, but the statistics always came up fine ;-) Will implement the check soon!
  18. Thank you Ryan, glad you like it! Do you think I could implement the missing 10% somehow? What do you think about resetting the custom dates? Currently you have to check a checkbox to reset, afterwards the Module is using again the last month from today as date range (default behaviour). Should this reset be done automatically after some time?
  19. Just updated the Module to version 1.1 on Github and Modules Section of Pw! New Features / Optimizations Better UI with tabs for the main categories (Audience, Content, Traffic sources) New options section: You can change the date range for your Statistics "strftime" used instead of "date" for the date range in header Fixed PHP notice errors There changed some module default config options + I added an option to set the format for the InputfieldDatetime fields. So I guess you should uninstall and install the whole module again to avoid errors. Sometimes I'm not sure if use the right words for my lables and descriptions, as I'm not a native english speaker/writer. So if anybody sees typo errors or a description that makes no sense, please tell me. I ended up using WireTabs, amazing simple to implement as everything with Processwire! =) Wish you all a nice day (night or whatever), I'm going swimming now here : http://www.bbc.co.uk...europe-10893835
  20. Thank you, this tutorial helped me to understand how Git works. Just wondering: Where are your local repositories of Processwire modules stored? Directly in the site/modules folder of a Processwire installation in the Document Root or somewhere else?
  21. I never used less/sass only "pure" CSS. To be honest, I never took time to read more than the basics and I didn't see benefits using it. But after reading throught this topic, maybe this will change with the next bigger project
  22. Thank you all for testing and the feedback! I'll fix the PHP warnings with the notices, maybe this will also sort out the problem with cyrillic symbols. Ryan, I guess this is caused by a long keyword without spaces? Great ideas! Trying to implement all of this in the next versions. I originally also wanted to use Tabs for the main sections, but I think the charts have some problems rendering correctly if they're in a hidden div, so I went with this simpler solution. But you're right, there is definitely too much on the screen right now! Now it's time to find some examples using WireTabs
  23. Thank you guys! In the meanwhile, the Project is on Github and the modules overview: http://modules.processwire.com/modules/process-google-analytics/ https://github.com/wanze/ProcessGoogleAnalytics I never used Github before and had to create an account first, thanks Soma for your Tutorial! Still I'll have to explore git a bit more ;-) Please let me know what you think and if it works for you! One feature that is on the Roadmap: Compare the statistics taken from the last month (Audience) with the previous month and show +/- percentage
  24. Hi! Just finished my first module This module adds a new "Google-Analytics" Page in your Admin-Panel and displays various Statistics from a Google Analytics Account. It uses the JQuery plugin "jqplot" to display the charts. Github: https://github.com/w...GoogleAnalytics Modules directory: http://modules.proce...ogle-analytics/ Features Visits by Date (Chart) General Statistics about Visits (Total visits, Visit duration, New visitors, Returning visitors etc.) Demographics: Countries, Cities, Languages System: Browsers, Operating Systems, Screen Resolutions Mobile: Operating Systems, Screen Resolutions Pageviews by Date (Chart) Top Content Traffic Sources: Keywords, Referral Traffic by Domain and URI Choose a default date range displaying statistics: last 24 hours, 2 days, 1 week, 1 month etc. Custom date range by setting a "start date" and "end date" Requirements Google Account and Analytics Account A Project in the Google APIs Console cURL Installation 1) Create a Project in the Google APIs Console: Create a new Project in the APIs Console: code.google.com/apis/console/ Under Services, enable the Analytics API Under API Access: create an Oauth 2.0 Client-ID Give a Product Name, choose "Web-Application", Domain doesn't matter Enter a Redirect URI to the GA-Page in your Processwire Installation: http://yourdomain.com/processwire/google-analytics/ Notes: The redirect URI must exactly match with the URL from the new "Google Analytics" page in Processwire. Open the Page and copy the URL from the address-bar (localhost does work too!) The project created in the APIs Console can be reused for every Processwire installation using this module. You just have to enter more redirect URIs 2) Install the module: Place the module's files in /site/modules/ProcessGoogleAnalytics Install the Module via the Admin-Panel Enter Client-ID and Client-Secret keys from the created project in the module config Load the newly created page "Google-Analytics" and click on the button "authenticate" Grant the module access to the Analytics Data Choose a Google Analytics account (Domain) from the dropdown Done: You should see the statistics. Check out the module config options for further customization In order to let other users see the Google Analytics page, you must give their role access to the "ga-view" permission. Ps. Processwire is awesome and so is this community!
  25. Hi all! I'm currently switching two projects from modx to Processwire - I have to say, Processwire is really awesome!! My sites are both multilang, so I decided to test and maybe use this module. Everything's working fine so far, just noticed two things: 1) I had a Page with the title "persönlich". Processwire generated a name "persoenlich" for this page, before installing this module. The module now generates the name "personlich" (notice the missing e when replaced the Umlaut). Looking into the "toSlug" method, I saw it uses the Santinizer::pageName method to generate the name. This method is using a replacement array from the "inputfieldPageName" module. In the settings of this module, I was able to change "ö=o" to "ö=oe", now i'ts perfect ;-) I was wondering why Processwire itself was not using the replacement array? 2) Caching does not work. There are no Page cache files generated or loaded when the module is installed. I'm still exploring the architecture of Processwire and don't know exactly how the caching is handled. Can anyone tell me if this is possible? Maybe something like this (pseudo code), after finding the page to load: $page = $modules->get('LanguageLocalizedURL')->parseUrl(); if($pages->getCache($page->id)){ //return the output of the cached file }else{ //Check first if caching is enabled in template... $pages->cache($page); include("./{$page->template}.php"); }
×
×
  • Create New...